Forum Moderators: phranque
redirect 301 /shop/product_info.php?cPath=60&products_id=70 [mystore.com...]
However it doesn't work. I was able to get this to work though:
redirect 301 /test www.test.com
So I believe the issue is related to the question marks, equal signs and so forth. I am thinking I need to comment these out somehow, but have not had luck using a variety of slashes and quotes.
Any help would be greatly appreciated.
--
Thanks in advance
Blaine
Also I am trying to use this code:
RewriteRule ^/shop/default\.php\?cPath\=21 /shop/new.php?cPath=50 [R=301,L]
I always see the rewrite rules begin with a ^ character, however after reading about regular expressions it seems like a "$" would be better since I'm looking at the end of the line and not the start.
Any additional pointers would be appreciated.
--
Thanks
Blaine
RewriteCond %{QUERY_STRING} ^cPath=21$
RewriteRule ^shop/default\.php$ /shop/new.php?cPath=50 [R=301,L]
Just for reference, you need to escape the following in normal regex patterns: ^$%.*+?\¦(){}[]
Within grouped alternates (inside square brackets) special rules apply; Under certain circumstances you will need to escape "^" and "-" and you'll always need to escape "]" since that character closes a group.
Jim