Jump to content

How To Add Lines To The .htaccess ?


Recommended Posts

hello,

 

I know it may seem strange, but I have to protect a prestashop website from any visit by a password (it's used as a private inventory).

 

the installation has been made in an /inventory folder, and I wish to protect access to this folder by .htaccess

 

as requested by the provider, I created an encrypted password and copied it into a txt file.

 

I am then supposed to add the following code to the .htaccess :

AuthUserFile /flex/domain/mysite.com/site/www/inventory/passlist.txt
AuthName "Restricted access"
AuthType Basic
require valid-user

reading the forums, it seems that I shoud put that after the following lines of PS basic .htaccess :

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

when I try, it seems that the modification is taken into account, but it does not work : as all I get is a "500 Internal Server Error".

 

I tried to put it elsewhere, without success.

 

and the the code seems correct too : if i replace all of the .htaccess by only the authorization lines, the protection works, and access granted using the chosen password - but then of course PS doesn't work anymore...

 

anyone have a clue ?

 

thanks,

 

damien

 

 

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...