aguernz Posted August 7, 2009 Share Posted August 7, 2009 Hi. Is there a way to modify my .htaccess file (see below), so that urls like http://avemariainspirations.com/content/3-terms-and-conditions-of-use become like this: http://avemariainspirations.com/content/terms-and-conditions-of-use (without the number) or like this: http://avemariainspirations.com/terms-and-conditions-of-use (without the number and /content tag). # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums # URL rewriting module activation RewriteEngine on # 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 ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,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 Thanks! Link to comment Share on other sites More sharing options...
-Johan- Posted August 9, 2009 Share Posted August 9, 2009 this work for products and categories URL too ? Link to comment Share on other sites More sharing options...
aguernz Posted August 9, 2009 Author Share Posted August 9, 2009 I was asking a question about whether it is possible to remove the numbers in my url rewrites. The preceding code, however, works for the .htaccess file for everything (to answer your question). It just has a number in it before text. Link to comment Share on other sites More sharing options...
-Johan- Posted August 9, 2009 Share Posted August 9, 2009 Ok so it don't remove the number for products and categories... Link to comment Share on other sites More sharing options...
aguernz Posted August 9, 2009 Author Share Posted August 9, 2009 That's correct, I'm just looking for someone who can help me to do that. I'm experimenting right now to see if I can do it myself. Link to comment Share on other sites More sharing options...
-Johan- Posted August 9, 2009 Share Posted August 9, 2009 I think it's not possible because we need the id.Maybe need to do URL rewrinting by SQL...But I'm not expert in this. Link to comment Share on other sites More sharing options...
Mephivio Posted August 12, 2009 Share Posted August 12, 2009 Good idea...is there any solution to do it ?thx Link to comment Share on other sites More sharing options...
Banibooi Posted April 29, 2010 Share Posted April 29, 2010 I'm going to bump this thread because I don't want to make a new one!Do any of you have a way to "fix" this?Instead of having *number*-content-goes-here, you have content-goes-here. Link to comment Share on other sites More sharing options...
rocky Posted April 30, 2010 Share Posted April 30, 2010 See my post here. Link to comment Share on other sites More sharing options...
Recommended Posts