hurray Posted August 22, 2010 Share Posted August 22, 2010 When you add a product, prestashop lets you edit the friendly URL. However it is not working for me. No matter what friendly URL I have, on the front-end it still shows the URL with =, ? .Can anyone help? Link to comment Share on other sites More sharing options...
razaro Posted August 22, 2010 Share Posted August 22, 2010 You must enable Friendly URLs under Back Office >> Preferences thenyou have to create a blank .htaccess and upload it to your root prestashop folder go toBack Office >> Tools >> Generators and then hit Generate .htaccess file. Link to comment Share on other sites More sharing options...
hurray Posted August 22, 2010 Author Share Posted August 22, 2010 Hi,I do not have the Generate /htaccess file option. Link to comment Share on other sites More sharing options...
razaro Posted August 22, 2010 Share Posted August 22, 2010 Did you make new empty file .htaccsess ? I attached file in zip . htaccess.zip Link to comment Share on other sites More sharing options...
sokpet Posted August 22, 2010 Share Posted August 22, 2010 This is what you have to write in your .htaccess (tested on 1.3.1) # URL rewriting module activation RewriteEngine on RewriteBase / # Force www RewriteCond %{HTTP_HOST} ^dominio.es$ RewriteRule (.*) http://www.dominios.es$1 [R=301] # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.)$ /product.php?id_product=$3&isolang;=$1$5 [L,E] RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E] 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 ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$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] RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php and ofcourse activale friendly URL in BO.when uploaded to your host do not forget to change line 5 and 6 with your domain name (if you want WWW rewrite to be enabled) Link to comment Share on other sites More sharing options...
Recommended Posts