Jump to content
AndrewDps

Redirect Multistores Product URLs

Recommended Posts

 

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!

Share this post


Link to post
Share on other sites

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/'.

Share this post


Link to post
Share on other sites
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 ;)

Share this post


Link to post
Share on other sites

You can, at the beginning and at the end, please note that the area that PS generates is marked.

Share this post


Link to post
Share on other sites
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 ^_^

Share this post


Link to post
Share on other sites

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]

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More