Hello, I know only very few basic things about apache configuration. I have a website that is made to redirect everything to the index.php file, except a few folders. What I want to add is a folder that will be password secured. So in the public_html folder i already have the following .htaccess file: <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> allow from all </Limit> RewriteEngine on RewriteCond $1 !^(index\.php|images|css|scripts|system|uploads|robots\.txt|styles\.css|site|docs|admin|validate|ep3gate\.class\.php) RewriteRule ^(.*)$ ./index.php/$1 [L] And in the folder "docs" that I want to protect i added the following .htaccess file: AuthUserFile /pswd/.htpasswd AuthName "Secured files, enter password" AuthType Basic require valid-user What happens is that before I added the .htaccess file to the 'docs' folder I could access the files inside, after I added the .htaccess file it gets me redirected to the index.php file without asking me for any password. What else should i do? Thank you very much for your help! Vlad.
Put the auth before the redirect and make sure you have the encrypted password string in the .htpasswd file.
thanks for the answer, but there are two separate files. The first one with the redirect in placed in the root (public_html) folder. The other one containing the auth is placed in the sub-folder (docs).