Jump to content

PS 8 redirect old url to new url for all products


Recommended Posts

Hi guys.

Can anyone tell me how to set up a redirect to all the old store URLs (already indexed) to the new store URLs?

The old store has a product URL like this

{rewrite} domain.com/product-page


The new store has a product URL like this

{category}/{rewrite} domain.com/category-page/product-page


How do I redirect all the old {rewrite} urls to the new {category}/{rewrite} urls?

Link to comment
Share on other sites

Ofcourse, I just have an module for it.

I'm looking for a way to not create thousands of different redirects.
I would like to create only one redirect for inserts on product urls

{category}/{rewrite} domain.com/category-page/product-page

 

 

You can tell me how to configure one redirect from

{rewrite} domain.com/product-page

to

{category}/{rewrite} domain.com/category-page/product-page

Link to comment
Share on other sites

On 4/11/2024 at 6:39 PM, FerrA said:

Ofcourse, I just have an module for it.

I'm looking for a way to not create thousands of different redirects.
I would like to create only one redirect for inserts on product urls

{category}/{rewrite} domain.com/category-page/product-page

 

 

You can tell me how to configure one redirect from

{rewrite} domain.com/product-page

to

{category}/{rewrite} domain.com/category-page/product-page

What you are asking is not possible.

You can't use a / (slash) in a subdomain.

The easiest way to achieve anything close to what your are searching is probably by adding rules to your .htaccess (or if you use Ngnix your nginx.conf).

Link to comment
Share on other sites

No, is not a sub domain. I explain me better

 

The old urls structures is like that {rewrite} and the new is like that {category}/{rewrite}

 

How I can create a single redirect for redirects all products pages from  {rewrite} to {category}/{rewrite}?

 

That's question!

Link to comment
Share on other sites

1 minute ago, FerrA said:

No, is not a sub domain. I explain me better

 

The old urls structures is like that {rewrite} and the new is like that {category}/{rewrite}

 

How I can create a single redirect for redirects all products pages from  {rewrite} to {category}/{rewrite}?

 

That's question!

I'm not quite sure that is possible if you are not using id's in your url either.
The old {rewrite} structure would need to figure out what product it was to reconstruct the new url {category}/{rewrite}. And since Prestashop by default uses id's this means it was already configured by a external module. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...