Today i want to show you the best method for regenrating htaccess file in your prestashop 1.5. What exactly is .htaccess file? And why this file is so important in Prestashop store engine? The answer is below:
.htaccess is a special configuration file - which is used on web servers running on the apache web server software. This file can be used to alter the configuration of the Apache, by that i mean that you are able to enable or disable some functionality and features which are available in apache. In Prestashop .htaccess is very important file. It is located at your store root directory and enables some environment variables. Without .htaccess it will not be possible to turn on pretty urls (url - rewriting rules etc.), disable access to some directories, actions etc.
Regenerating .htaccess file - available methods
Sometimes it is necessary to regenerate htaccess file. After some changes in seo & url's settings, after adding images into preferences -> images section some features will not work properly in your Prestashop front office. In this case - you must regenerate .htaccess file. How to do that? In prestashop 1.5 it isn't as simple as it seems, but we want to share some methods with you:
Removing file from your root directory
This is simple method and always work. If you want to delete this file from your root directory - you should use some ftp client like total commander. Just log in into your ftp, open root directory and delete .htaccess file. Don't forget to download this file to your hdd, and make backup. It is important, because sometimes you will need to restore it.
Regenerate in back office: Preferences -> Seo Urls.
This method works only if you've got access to your back office. In this case you must go to the preferences -> Seo Urls section and turn on friendly urls - and right after that - turn it off. Of course, if you've got friendly urls turned to on - for the first you should turn it off, and then turn it on. After that your htaccess file will be regenerated properly.
Regenerate in back office: Turning multistore on, and then turning multistore off
This method also works only if you've got an access to back office. In this case you must go to the preferences -> general and turn on multistore feature. After that you should turn it off. Of course, if you have got multistore feature turned to on - for the first you should turn it off, and then turn in on again. After that - your htaccess file will be regenerated properly.