php - mod rewrite rule for searching a string from url and replace just domain name of that url -
i want create rewrite rule .htaccess. example: in url if itemid=702
found want redirect below
original url is:
www.dashboard.example.com/comp/temp/health/appt?itemid=702
redirect to:
www.admin.example.com/comp/temp/health/appt?itemid=702
i have tried below condition, doesn't work.
rewritecond %{request_uri} itemid=702$ rewriterule .* http://admin.example.com [r,l]
how can create this?
you're close, change rule to:
rewritecond %{query_string} itemid=702 [nc] rewriterule (.*) http://admin.example.com/$1 [r,l]
Comments
Post a Comment