Forum
.htaccess and Rewrites
Not a Perch specific question but wondering if anyone can help me.
In layman's terms i.e non regex guru
How do I redirect the following URL with a query string. I've read up on rewrite rules and have my rewrites working as well as 100's 301 of rewrites working on this site, but this one is baffling me, I only want to redirect specific URLs that may contain query string variables as per this example.
Redirect 301 /my-booking-url?charity=Positive%20Action%20on%20Cancer https://www.my-site.com/why-we-hear-you
My current rewrite rules look like so
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Any help / explanation would be greatly appreciated.
Many thanks
Lee
I think you can use
RewriteCond %{QUERY_STRING}
maybe something like