cromata Posted June 7, 2009 Share Posted June 7, 2009 I have a problem activating my friendly urls on my store using godaddy as my host.I have activated friendly urls option in my preferences on my admin page.I have renamed my htaccess.tx file to htaccessI have tried it with the original code prestashop generates and currently i'm testing this:# URL rewriting module activationRewriteEngine onRewriteCond %{REQUEST_METHOD} !^(TRACE|TRACK|GET|POST|HEAD)$RewriteRule .* - [F]RewriteBase /Options +FollowSymLinks# URL rewriting rulesRewriteRule ^([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]# Catch 404 errorsErrorDocument 404 /404.phpbut i have had no good luck =(I would appreciate any help.RegardsMario Link to comment Share on other sites More sharing options...
ChrisG Posted June 18, 2009 Share Posted June 18, 2009 Hi Mario,Not sure if you sorted your problem, but I had the same issue - Friendly URLs were not working on Godaddy host.After spending few hours, I have it working now. It turn out to be that the "RewriteEngine on" should be with capital "On" (RewriteEngine On).Here is my full .htaccess:--------------------------------------------------------------------------# URL rewriting module activationOptions +FollowSymLinksRewriteEngine OnRewriteBase /# URL rewriting rulesRewriteRule ^([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 ^([0-9]+)\-([0-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]# Catch 404 errorsErrorDocument 404 /404.php----------------------------------------------------------------------------JPG rules I saw from another post that are generated by v1.2, so I included them, but marked them off for now - need testing under v.1.1.05That's all, hope this will help you.Best regards,Chris Link to comment Share on other sites More sharing options...
Recommended Posts