AndrewDps Posted October 1, 2019 Share Posted October 1, 2019 Prestashop 1.6.0.14 I have one main website: www.mainwebsite.com and many multistores. I would like to delete all the multistores and to use only the main website.I would like to redirect all the product urls of the deleted multistores to the product urls of the main website. Sample OLD MULTISTORE URL: http://www.multistore1.com/category1/209956-product-1.html IT MUST REDIRECT TO: https://www.mainwebsite.com/en/category1/209956-product-1.html As you can see the product ID is the same. How can I do it? Actually old multistores domains are pointing to the main website server IP. I'm ready to pay the service if necessary. Thanks for your help! Link to comment Share on other sites More sharing options...
joseantgv Posted October 1, 2019 Share Posted October 1, 2019 You only need to redirect to a different domain or also manage languages and different category names in URL? I mean, in your second URL there is an '/en/'. Link to comment Share on other sites More sharing options...
AndrewDps Posted October 1, 2019 Author Share Posted October 1, 2019 15 minutes ago, joseantgv said: You only need to redirect to a different domain or also manage languages and different category names in URL? I mean, in your second URL there is an '/en/'. It could be great to manage also the languages Link to comment Share on other sites More sharing options...
joseantgv Posted October 1, 2019 Share Posted October 1, 2019 If you just need to change domain you can check this https://stackoverflow.com/questions/19816284/redirect-all-urls-exactly-just-change-domain-name Link to comment Share on other sites More sharing options...
AndrewDps Posted October 1, 2019 Author Share Posted October 1, 2019 3 minutes ago, joseantgv said: If you just need to change domain you can check this https://stackoverflow.com/questions/19816284/redirect-all-urls-exactly-just-change-domain-name The prestahop htaccess is generated automatically so I cannot add code in it... Link to comment Share on other sites More sharing options...
joseantgv Posted October 1, 2019 Share Posted October 1, 2019 You can, at the beginning and at the end, please note that the area that PS generates is marked. Link to comment Share on other sites More sharing options...
AndrewDps Posted October 1, 2019 Author Share Posted October 1, 2019 4 minutes ago, joseantgv said: You can, at the beginning and at the end, please note that the area that PS generates is marked. Can you help me to complete this task? I don't know what to write in it Link to comment Share on other sites More sharing options...
joseantgv Posted October 1, 2019 Share Posted October 1, 2019 Just try to put this at the beginning of .htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^(?:www\.)olddomain\.com$ [NC] RewriteRule ^ https://www.newdomain.com%{REQUEST_URI} [L,R=301] Link to comment Share on other sites More sharing options...
AndrewDps Posted October 17, 2019 Author Share Posted October 17, 2019 We solved adding this code at the top of the htaccess: # START REDIRECT RewriteCond %{HTTP_HOST} ^(?:www\.)oldwebsite\.net$ [NC] RewriteRule ^ https://www.newwebsite.com%{REQUEST_URI}?utm_source=oldwebsite [L,R=301] #END REDIRECT Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now