Hi, I am trying to use this redirect, but it isn’t doing anything.
RewriteRule ^directory/page.shtml?ref=test$ http://www.website.com/page.shtml?ref=test2 [R=301,L]
Any ideas why it doesn’t work?
Thanks
Hi, I am trying to use this redirect, but it isn’t doing anything.
RewriteRule ^directory/page.shtml?ref=test$ http://www.website.com/page.shtml?ref=test2 [R=301,L]
Any ideas why it doesn’t work?
Thanks
Yes: Simply that you don’t understand mod_rewrite (a RewriteRule can only examine the {REQUEST_URI} string, i.e., not the {QUERY_STRING}).
You might benefit from reading the mod_rewrite tutorial linked in my signature as it contains explanations and sample code. It’s helped may members and should help you, too.
Regards,
DK