Its been a long and frustrating time for all those who have had a terrible time trying to figure out and get help with the errors occurring after enabling Friendly URL's in Prestashop. I myself had the same problem for quite a while before finding solutions.
The problem at hand is typically the .htaccess file settings preventing Prestashop from exercising
various permissions when handling the files it needs on a web host. Another common problem
is getting an error 500 message. This can be caused by a global setting configured by your host in
which sometimes they are unwilling to change due to their security protocols used.
Assuming your hosting provider uses a Linux based system(nearly always the case for standard hosting needs), you should be able to test the below modification to your .htaccess file in your
website's main directory.
Add to your ".HTACCESS" file, the following lines of code:
# URL rewriting module activation
RewriteEngine on
RewriteCond %{REQUEST_METHOD} !^(TRACE|TRACK|GET|POST|HEAD)$
RewriteRule .* - [F]
RewriteBase /
Options +FollowSymLinks
# 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]
# Catch 404 errors
ErrorDocument 404 /404.php
----------------------------------------------------------------------------------------------------------------
If you are experiencing a 500 error with Prestashop, you may have issues with your webhosts
php.ini settings. Some hosts allow you to make modifications to this file and some don't. Normally
you would never need to override any php.ini settings. Your exact issue may vary and you should contact your host for troubleshooting.
Make sure you clear your browser's cookies if you don't notice any change. Also go to the
sitemap module and update it just to be safe.
The Results should take place as soon as your website says that your settings have been saved. Check your product pages and everything should be alright. With one exception. Some people can't get the proper URL to show up under "Recently Viewed" viewed items. I'm pretty sure you can just add another line in the
ReWriteRule
list and use the name of the recentlyviewed php file and match it like the others and it should work.
I haven't verified adding this rule yet, but you can always revert your settings if an issue is caused.
I hope this worked for everyone. If you are new to
Prestashop or webhosting in general and need an installation or assistance, I can help you for a non mandatory donation. For free. But if you value
my assistance or are considering having it regularly, you can choose any amount to donate via paypal, mail or Google Wallet. There is no pressure at all for donations. Additionally, I am a webhosting
reseller and I will freely setup your account with my service for a trial period. You only need to
pay when you are satisfied for as low as $5 a month. Lack of payment will never result in your account being suspended until there has been 3 months of missed payments, without the requirement
for immediate payment of past due amounts to resume service.
You can contact me via the contact link at the bottom of this page and express your concerns.
Thanks for visiting!