Can I password protect a location (not directory) in apache using htaccess?
Posted
by
dimvic
on Server Fault
See other posts from Server Fault
or by dimvic
Published on 2010-10-21T18:40:32Z
Indexed on
2010/12/30
10:56 UTC
Read the original article
Hit count: 146
I have used code like this in apache configuration to protect locations with password
<Location ~ "/admin.*">
AuthType Basic
AuthName "Protected Area"
AuthUserFile /home/user/public_html/.htpasswd
Require valid-user
</Location>
is there a way to do the same thing using an htaccess file?
the locations I want to protect don't really exist on the filesystem, it's locations available thanks to mod_rewrite
© Server Fault or respective owner