I just did a redesign for http://www.wildchildclothes.com which has a new URL structure. The old site ran on Zen Cart and had a bad URL structure. Here are some examples of what I want to redirect from:
OLD: http://www.wildchildclothes.com/page.html?chapter=1&id=21
NEW: http://www.wildchildclothes.com
and…
OLD: http://www.wildchildclothes.com/index.php?main_page=faq_info&fcPath=0&faqs_id=13
NEW: http://www.wildchildclothes.com/customer-service.html
Here is what’s in my .htaccess to achieve this:
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^([^&]*&)*chapter=1(&|$)
RewriteCond %{QUERY_STRING} ^([^&]*&)*id=21(&|$)
RewriteRule ^page\.html http://www.wildchildclothes.com? [L,R=301]
RewriteCond %{QUERY_STRING} ^([^&]*&)*main_page=faq_info(&|$)
RewriteCond %{QUERY_STRING} ^([^&]*&)*fcPath=0(&|$)
RewriteCond %{QUERY_STRING} ^([^&]*&)*faqs_id=13(&|$)
RewriteRule ^index\.php$ http://www.wildchildclothes.com/customer-service.html? [L,R=301]
But this doesn’t work at all – I only get sent to my 404 page instead of begin redirected. Can anyone shed some light? The full .htaccess is posted below.
Thanks much,
Jonah
None of the above solutions worked for me, but this does:
To redirect http://www.wildchildclothes.com/page.html?chapter=1&id=21 to http://www.wildchildclothes.com:
To redirect http://www.wildchildclothes.com/index.php?main_page=document_product_info&products_id=280 to http://www.wildchildclothes.com:
To redirect http://www.wildchildclothes.com/index.php?main_page=faq_info&fcPath=0&faqs_id=9 to http://www.wildchildclothes.com/customer-service.html:
I’m sure there are better ways to do this but this works for me and .htaccess just gives me a headache so I’m not digging any further.
I hope this helps someone else out there!