Page 1 of 1

htaccess not redirecting old url

Posted: Fri Jun 03, 2011 4:41 am
by pmchardy
I have enabled multi store in open cart

I have added


RewriteCond %{HTTP_HOST} ^adventurebaby\.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.adventurebaby.co.uk/$1 [R=301,L]

to the htaccess file so that adventurebaby maps to the correct store and not the default store

I am moving from an erol store and want to catch ALL urls from the old store and redirect them to www.adventurebaby.co.uk

Redirect 301 http://www.adventurebaby.co.uk/ http://www.adventurebaby.co.uk



When I try I get redirect loops

an example of the url I want to redirect to www.adventurebaby.co.uk is ww.adventurebaby.co.uk/bush-baby-vaude-and-little-life-baby-carriers-602-0.html


Thanks for the help

Peter

Re: htaccess not redirecting old url

Posted: Fri Jun 03, 2011 7:38 am
by fabioDexus
Hello Peter.
I guess that you are getting infinity redirect is that right?
Try changing you htaccess rule to this
RewriteCond %{HTTP_HOST} ^adventurebaby\.co.uk$ [NC]
RewriteCond %{REQUEST_URI} !^http://www.adventurebaby.co.uk\/?.*$
RewriteRule ^(.*)$ http://www.adventurebaby.co.uk/$1 [R=301,L]

Re: htaccess not redirecting old url

Posted: Sat Jun 04, 2011 2:20 am
by pmchardy
Thanks for the reply, still not working
in the .htaccess I have added

RewriteCond %{HTTP_HOST} ^adventurebaby\.co.uk$ [NC]
RewriteCond %{REQUEST_URI} !^http://www.adventurebaby.co.uk\/?.*$
RewriteRule ^(.*)$ http://www.adventurebaby.co.uk/$1 [R=301,L]

when I go to http://www.adventurebaby.co.uk/bush-bab ... 602-0.html

I still get THE PAGE YOU REQUESTED CANNOT BE FOUND!

?

Thanks

Peter

Re: htaccess not redirecting old url

Posted: Sat Jun 04, 2011 4:18 am
by fabioDexus
Check to see which real page you are going and avoid the old redirect that was redirecting indefinetely
Give an example to the page you want to type and page you want to get