[SOLVED] How To 301 Redirect from Old Site to new? Opencart

Please LogIn to Reply!

Post By: guest | 01-12-2013 07:57 Reply

Question

Hey all,

I can't for the life of me get 301 redirects to work from old pages to new pages that are in OC.

For example, before I had http://www.domain.com/sdr/Welcome.html

I'm trying to redirect that to my new homepage: http://www.domain.com

I'd like to do this individually for several files, as there are old product links that need individual updates as well.

I tried the following in my htaccess:

Code: Select all
Redirect 301 /sdr/Welcome.html http://www.domain.com/


as well as

Code: Select all
RewriteBase /
RewriteRule ^sdr/Welcome.html$ http://www.domain.com [L,R=301]


putting both after Rewrite On, but before the OC htaccess rewrite code.

I also tried putting the Redirect 301 before the Rewrite On - all with no luck.

With both of the above, I just get taken to: http://www.domain.com/?_route_=sdr/Welcome.html

This is soooo frustrating. What am I doing wrong? Can anyone help!?

Answers

anybody? would love to get redirects in asap but just can't seem to figure it out :-/

I'm assuming the domain name hasn't changed

After the RewriteBase line

Code: Select all
RewriteRule ^personalised-ribbon-for-special-occasions/christening-personalised-ribbon.html$ /christening-personalised-ribbon [R=301,L]


If still getting the ?_route_.... after your domain, try appending a ? on the new page name

Code: Select all
RewriteRule ^personalised-ribbon-for-special-occasions/christening-personalised-ribbon.html$ /christening-personalised-ribbon? [R=301,L]

The question-mark did it for me! Thanks AGAIN Simon!

Tags:

opencart 301 redirect

opencart www redirect

Reply Or Comment!
Please LogIn to Reply!