Zen Follower
- Join Date:
- Mar 2006
- Location:
- Australia
- Posts:
- 286
- Plugin Contributions:
- 3
redirect query string eg domain/index.php?main_page=index&cPath=106
Hi guys
I had to work this out and it took me a while and there's nothing in the forums to date. So here is the issue and solution.
Issue is that you want to redirect a URL like this:
"http://www.bluewolf.net.au/zencart/index.php?main_page=index&cPath=257" to one like this
"http://www.bwcommercial.com.au/index.php?main_page=index&cPath=6"
A normal redirect will drop everything after the ? being the query string.
To achieve this edit your .htaccess and insert:```
RewriteEngine on
RewriteCond %{query_string} ^main_page=index&cPath=257
RewriteRule ^zencart/index.php$ http://bwcommercial.com.au/index.php?main_page=index&cPath=6 [R=301,L]