Jump to content

htaccess automatic override issue


Recommended Posts

My host recently installed latest version of Prestashop for me. For a while everything looked fine, host set up double password using htaccess for extra security purposes.  However when I turned 'Friendly URLs on' the admin login disappeared and we couldn't login.  Even though this issue has been rectified by host, it highlighted an issue that I was not aware of, namely when certain changes take place (eg turning friendly urls on/off) PS generates a new htaccess which automatically overrides the current one, thus causing undesired implications, such as images, pages disappearing according to other forum entries.

 

Therefore, my question is two-fold:

 

1) does anyone have a definitive list of which specific buttons/actions changes in Prestashop back office, apart from Friendly URLs, trigger a new htaccess everytime?  Without knowing, we are in the dark as to what changes to the shop will generate a new htaccess which would override current settings.

 

2) is there someway of preventing a current htaccess file being automatically and completely replaced?  For example, I have read for Wordpress, which also automatically generates htaccess overriding previous version, that you can add a code into htaccess to prevent the whole file being completely replaced each time.   Is it possible to do something similar in Prestashop?

Sorry for long post, but I am new to PS, I imagine any answers to htaccess automatic override issue may be of interest to other forum users. 

Link to comment
Share on other sites

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

the .htaccess file has the above as the very first line of the file.  Your host should read this line and follow instructions. 

 

So long as the host places their code outside of those 2 lines (above or below) then their code would be retained.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...