Jump to content

URL mod_rewrite ?


Recommended Posts

Dear PrestaShop users!

Does anyone know how to enable complete mod_rewrite for pretty url.
If I enable pretty url in prestashop admin control panel it still shows

domain_name.com/3-accessories - should be domain_name.com/accessories

domain_name.com/7-ipod-touch.html - should be domain_name.com/ipod-touch

domain_name.com/about-us.php - should be domain_name.com/about-us

Bold text shows a problem!


In .htaccess, in root directory of a prestashop I have

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /404.php

Any suggestions most welcome! :)

Link to comment
Share on other sites

  • 2 weeks later...

I could do it, but it means modifying the core prestashop files, which doesn't seem wise given that upgrades will no doubt be coming thick and fast over the next few months. Perhaps this is more a feature request to improve the "pretty url" function?

Paul

Link to comment
Share on other sites

  • 1 month later...

I have almost the same problem

URL REWRITE WITHOUT ID

Hello Sirs,

I wanna know how to put URL rewrite WITHOUT the ID of catalogue/products

Example:
without ID
http://localhost/prestashop_1.0/accesorios (yes, what i want!!!)
http://localhost/prestashop_1.0/ipod-touch.html

with ID (default in prestashop)
http://localhost/prestashop_1.0/3-accesorios (no!!!)
http://localhost/prestashop_1.0/7-ipod-touch.html

Thankx in advance,
FA

============================================
Bonjour,

Je veux savoir comme je programme le module de URL simplifiée SANS le ID des catalogues/produits …

par example:

sans ID
http://localhost/prestashop_1.0/accesorios (oui)
http://localhost/prestashop_1.0/ipod-touch.html

avec ID
http://localhost/prestashop_1.0/3-accesorios (non)
http://localhost/prestashop_1.0/7-ipod-touch.html

Merci beaucoups
Cordialement,

Link to comment
Share on other sites

  • 4 years later...

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