Protect multiple specific files

Security in htaccess: htpasswd, 401 Authentication

Protect multiple specific files

Postby produke » 27 Sep 2006 07:25

This targets any files that start with exec, env, doit, phpinfo, and w. Something like this is useful in a /cgi-bin/ to allow the developer access to executables but deny everyone else.

Code: Select all
<FilesMatch "^(exec|env|doit|phpinfo|w)*$">
AuthName "Development"
AuthUserFile /.htpasswd
AuthType basic
Require valid-user
</FilesMatch>
User avatar
produke
 
Posts: 242
Joined: 25 Sep 2006 04:48

Return to Security and Authentication



Who is online

Users browsing this forum: No registered users