eknepfler Posted July 25, 2009 Share Posted July 25, 2009 Rename your htaccess.txt to .htaccess (use cmd prompt)Grant permission on .htaccess to IIS_WPG for IIS 6 or IIS_IUSRS for IIS 7Edit .htaccess so it contains only this: # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L] Enable Friendly URLs in Prestashop AdminPoof!I like IIS Mod-ReWrite pro, it was fast and easy to set up and works great with Joomla. Not cheap though, $150 per server, but if you struggle with another one for more than an hour or two you've already burned that in time, so I think it's worth it given how easily it works. Link to comment Share on other sites More sharing options...
dennis1981 Posted September 21, 2009 Share Posted September 21, 2009 All URLs are correctly parsed only the images dont load... i notice in your rewrite rules you dont include anything about images...could you please tell me how do you handle that ?this is my rule for .img RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg[QSA,L]RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [QSA,L]but cant make it work!anybody has any ideas? Link to comment Share on other sites More sharing options...
mr_c Posted September 21, 2009 Share Posted September 21, 2009 Url rewriting is one of the biggest problem with prestashop at the moment. If it's wrong and is rewriting bad urls, google will index them and it will be very annoying to fix (you lose your rankings).Come on guys! fix it ASAP please!As for the images, does this not work for you dennis: 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] Link to comment Share on other sites More sharing options...
dennis1981 Posted September 22, 2009 Share Posted September 22, 2009 Thanks for your reply mr. c !!I made it work finally last night Specifications : O/S: Windows Server 2003 Web Server: IIS 5.0I know its the worst setup you could find..and i wouldnt recommend it to anyone...but this is what i was given at my job..and i dont have the rights to change it..hopefully when the current contract ends..fingers crossed we will integrate to Ubuntu wth Apache and make our lives happier!!!I used the Ionic Rewrite module..but with not much success. Then i purchased the IIS-Mod rewrite module from http://www.micronovae.com/ModRewrite/ModRewrite.html..and here is my Rewrite rules:RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg[L]RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L]RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L]RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L]RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L]RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L]RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L]RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L]Best Regards to alldennis Link to comment Share on other sites More sharing options...
siteuye Posted January 14, 2014 Share Posted January 14, 2014 (edited) Hello dennis1981 I also Windows 2003 and IIS 6.0 Ionic Rewrite module installed. But I need help with settings. Would you help me? I did settings. Ionic Rewrite module status looks okay. Ini file is running but does not understand. How can I test INI file? Edited January 14, 2014 by siteuye (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts