View Single Post
Old 05-09-2003, 11:44 PM  
programmer4hire
Registered User
 
Join Date: Aug 2002
Location: Seattle
Posts: 43
Quote:
Originally posted by The Click
AuthUserFile /home/clicker/public_html/cgi-bin/pass/.htpasswd
AuthName "Members Only"
AuthType Basic
Require valid-user
I would add the following to your .htaccess for extra security:

RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*htaccess.*$ [OR]
RewriteCond %{THE_REQUEST} ^.*htpass.*$
RewriteRule .* http://www.mydomain.com/members [R,L]

OR

<Files ~ "^.*\.ht.*">
Order allow,deny
Deny from all
</Files>

Then no one can view your htpasswd or htaccess file.

Chris
__________________
Available for contract programming work. C, C++, JAVA, Perl, PHP, Delphi, MySql, Oracle. [email protected]
programmer4hire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote