
July 26th, 2000, 09:42 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Yes. If you have access to httpd.conf, use <LocationMatch>. If not, use <FilesMatch> in your .htaccess file.
<FilesMatch "somefile.html$">
AuthName "Dimman Site"
AuthType Basic
AuthUserFile /path/to/.htpasswd
require valid-user
</FilesMatch>
<FilesMatch "anotherfile.html$">
AuthName "Dimman Site"
AuthType Basic
AuthUserFile /path/to/another/.htpasswd
require valid-user
</FilesMatch>
The known bug of using FilesMatch for your purpose is that, if the same file is found under the subdirs of your .htaccess, it will also match and prompt for login. Using <LocationMatch>, however, give you exact URL match.
<LocationMatch "^/private/anotherfile.html$">
|