Monday 21 September 2015

How to URL Rewrite your PrestaShop to Work with HostForLIFE.eu Hosting?

Leave a Comment
How to URL Rewrite your PrestaShop to Work with HostForLIFE.eu Hosting?It’s been a long and frustrating time for all those that have had a terrible time making an attempt to figure out and get help with the errors occurring when enabling Friendly URL's in Prestashop. i actually had an equivalent problem for quite a while before finding solutions. The problem at hand is usually the .htaccess file settings preventing Prestashop from exercise various permissions once handling the files it needs on a web host.

Another common problem is obtaining an error 500 message. This could be caused by a global setting configured by your host in which sometimes they're 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 web hosting
php.ini settings. Some web hosting allow you to make modifications to this file and some don't. HostForLIFE.eu prides itself in providing Full Trust web hosting with a rare combination of unmatched reliability, quality and affordability.

HostForLIFE.eu’s edge is derived through unparalleled company management and a culture of employee driven initiatives. With their fully support on Microsoft Windows and PrestaShop in their Windows Server, HostForLIFE.eu is the best choice to host your Prestashop 1.6.1.1 hosting. They are so confident in their hosting services they will not only provide you with a 30 days money back guarantee, but also they give you a 99.9% uptime guarantee. Their Prestashop 1.6.1.1 hosting plan is starting from €3.00 /mo. 

European PrestaShop Hosting

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! 

http://hostforlife.eu/

0 comments:

Post a Comment