Jump to content

htaccess redirect


Recommended Posts

I saw this on other website and i need help with something similar 

At the moment, I'm using the default Prestashop structure:


Which produces the following links:


I'm now looking at changing it to the following structure (which I think might be more efficient because you can find the same words on category and product names):


Which would produce this kind of link:


But now I don't really know how to handle the change, if it can even be done easily?


Using a RedirectMatch directive from mod_alias in your .htaccess file should do the trick:

RedirectMatch permanent /[^/]+/([0-9]+)-(.*)-([0-9]+)\.html$ /$2-$1-$3

This pulls out the matching parts of your old URLs and redirects them to the new format.


My previous product seo was {manufacturer:/}{id}-{rewrite} and now its {category:/}{rewrite}-{id}

How do i redirect it in htaccess?

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