Dear Support,
I have a question about changing the seo url from a old url to a new updated url link. I want to update my seo friendly url but I try to avoid to loose my google search result in the best way. Then I want to redirect my old url to the new url directly. I understand this is something I do in the .htaccess file.
Right now I´m using your SEO Pack, I have a SSL certificate for HTTPS and I always www in my store.
What is the right setting to add to the .htaccess file and how long time do I need to keep the information inside the .htaccess file?
Best regards Thomas
|
|
Hi Thomas,
This topic is a bit aside from the scope of our theme support. We are sure there are plenty threads in the official OpenCart that discuss the same problem.
https://forum.opencart.com/viewtopic.php?t=66581
http://stackoverflow.com/questions/29116111/redirect-https-to-http-using-htaccess-in-opencart
https://mmosolution.com/blogs/Redirect-to-HTTP-non-www-to-HTTPS-www-htaccess-for-Opencart.html
BR,
ThemeBurn team
|
|
Thanks Support-team!
I figured it out how I should configure the .htaccess file for redirect old url´s to the new destination. Below info can maybe be good for other people.
I added following lines under “SEO URL Settings”:
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
#my own title for specific url, just for my own info
RewriteRule ^old-category/old-product$ https://www.mydomain.com/new-category/new-product-url/ [R=301,L]
RewriteRule ^old-product$ https://www.mydomain.com/new-category/new-product-url/ [R=301,L]
#another redirect if needed here…
I have specified both the category directory and also the product url itself, and I hope this is the right way to do. It worked for me. When Google have indexed the new url´s I´m going to remove the lines in the .htaccess file.
Best regards Thomas
|
|
Hi Thomas,
We are happy we’ve helped.
P.S. Leaving extra redirects won’t hurt. Any old links to your website will not bring 404.
BR,
ThemeBurn team
|
|