Jump to content

Recommended Posts

Hi

 

url rewriting is working fine on my website, but I would like to improve it.

 

a product url looks like :

http://vincimusic.net/guitare-classique/35-camps-sp6s-3796600002014.html

 

It means that after the category, the rewrite url of the product includes its ID and name but also the EAN code.

 

I would like to have rewrite url without the EAN code, so they could look like :

http://vincimusic.net/guitare-classique/35-camps-sp6s.html

 

My htacces lines about rewrite url for producst are :

RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]

RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]

 

I don't feel secure in trying to change thoses lines and I don't know if coming back to the previous htacces file could be done safely to restore anything in case of bugs.

 

Can anyone tell me if the process is risky or safe ?

Is somebody skilled about manipulating rewrite rules and make disapear the ean code ?

 

Thanks for your help

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