cancel
Showing results for 
Search instead for 
Did you mean: 

.htaccess not working

N/A

.htaccess not working

I have created a folder on my own server (one at home, not the plus net ones) and i have a .htaccess and a .htpasswd file in there.. i have the htaccess set up correctly yet it isnt working


Is there anything i have to do to apache to get it to work?
6 REPLIES
Community Veteran
Posts: 14,469
Registered: 30-07-2007

.htaccess not working

I would conclude you may not have it setup correctly as apache does not normally need any config changes to recognise it.

Can you post what you have in .htaccess and the full path to your web directory, and where you have put the htpasswd file?
N/A

.htaccess not working

Web DIR: /var/www/html/

htaccess: /var/www/html/files/.htaccess
htpasswd: /var/www/html/files/.htpasswd


contents of htaccess:


AuthUserFile /var/www/html/files/.htpasswd
AuthGroupFile /dev/null
AuthName "Please Login"
AuthType Basic

require valid-user

ErrorDocument 401 "401"
ErrorDocument 404 "404"
N/A

.htaccess not working

can someone help me please..
Community Veteran
Posts: 14,469
Registered: 30-07-2007

.htaccess not working

Can't see anything obviously wrong unless you spelt either .htaccess or .htpasswd incorrectly in the locations you stated.

Are the files world readable - i.e. chmod 705 (or 707). try chmod 777 and see if that helps.

Are there any errors reported in the apache logs?

Have you changed the apache http.conf file? Check the section related to .htaccess has not been commented out.
N/A

.htaccess not working

It appears that it was disabled in the httpd.conf file.. it was set to AllowOverwrite None
which i changed to All and now it works


Thanks for the help Cheesy
Community Veteran
Posts: 14,469
Registered: 30-07-2007

.htaccess not working

Glad it was something simple.