avaxis Posted November 20, 2008 Share Posted November 20, 2008 .htaccess -correctmod rewrite rules -correcthttp://www.avmpower.com/rewrite.php(the fact that this test works shows that my htaccess is correct, but i've included it anyway) # 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] RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L] # Catch 404 errors ErrorDocument 404 /404.php php settings? -correctallow_url_fopen local value = on, master value = onBack Office > Preferences > Friendly URL = YEShttp://www.avmpower.com/product.php?id_product=10 = workshttp://www.avmpower.com/10-pivot-raizin-vs1.html = not workingwhat the flying duck?i am not a coding expert, but i do know the basics, i've read the knowledge base, searched the forums, and thus I've tried all solutions that i can find. anybody have any clue? Link to comment Share on other sites More sharing options...
snoophy0 Posted November 22, 2008 Share Posted November 22, 2008 i met the same problem, i do know why, can anybody please help us ?it can not creat HTML pages, when click the link , it shows "not find".......hi friend,i just visited your website , i found your html webpage is normal now,how did you solved the problem ? will you please tell me ? thanks !~ Link to comment Share on other sites More sharing options...
snoophy0 Posted November 22, 2008 Share Posted November 22, 2008 who can help me ????????????? urgent ~~~~~~~~~~~~~~~~~~~ Link to comment Share on other sites More sharing options...
Nerijus Posted December 1, 2008 Share Posted December 1, 2008 Soliution:http://www.prestashop.com/forums/viewthread/7064/general_discussion/solution__friendly_url_not_working/ Link to comment Share on other sites More sharing options...
kacrut Posted December 14, 2008 Share Posted December 14, 2008 are not use in localhost? Link to comment Share on other sites More sharing options...
thiswholesale Posted January 12, 2009 Share Posted January 12, 2009 Hey guys I had the same problem and found the solution today. The .htaccess file is slightly incorrect. This is the default that was given to us: # 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] RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L] # Catch 404 errors ErrorDocument 404 /404.php Now here is the correct version: # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-zA-Z0-9-]*)/S=([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 errors ErrorDocument 404 /404.php Look at the 1st rewrite rule on the corrected version and u should see "S=". This is what is needed to make all of your links able to be URL Friendly when u choose that option in PrestaShop. I hope this works for u as it did for me. I went crazy for months trying to figure it out. Link to comment Share on other sites More sharing options...
thiswholesale Posted January 13, 2009 Share Posted January 13, 2009 Disregard my previous correction of the .htaccess file. Instead of adding "S=" in the 1st row, U should have your .htaccess file look like 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,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 ^(.*)/S=([^/]+)/(.*) $1/$3 [E=STATUS:$2] # Catch 404 errors ErrorDocument 404 /404.php Notice there is a new RewriteRule added at the end. This should work 100%. I will let u know if there is anything wrong. Link to comment Share on other sites More sharing options...
apples Posted April 25, 2009 Share Posted April 25, 2009 This does not work.I am using Hostgator. Link to comment Share on other sites More sharing options...
kyrre Posted April 29, 2009 Share Posted April 29, 2009 My products worked fine with friendly urls, but the CMS pages did not. After replacing the .htaccess with the code from thiswholesale it's now working.Thank you!BTW: Is there a way to translet urls from my old shop to my new shop? Now customers get a 404 page when finding old links on search engines. It's about 80 products I need to redirect.Old url: http://shop.pushvideo.no/scripts/prodview.asp?idProduct=150New url: http://shop.pushvideo.no/66-tt-review-2008.html Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now