Skip to main content

Posts

Showing posts from June 10, 2019

htaccess redirection / passwd subfolder problem

Sometimes when we need to put htaccess password or redirection in the subfolders of a site like /home/user/public_html/SVT/VVT/.htaccess. In this case there is a possiblity of .htaccesss is not getting picked by apache.. For making apache to read the subfolder .htaccess file put the below line in the first of the htaccess file. ErrorDocument 401 "Unauthorized". So the .htaccess file for password protection will be as follows: ErrorDocument 401 "Unauthorized" AuthUserFile /home/username/public_html/SVT/VVT/.htpasswd AuthType Basic AuthName "Password Protected Area" Require valid-user