Add new comment

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by apachedude (registered user) on Tue, 2007-01-23 05:20.

Nice easy to understand article! I just wanted to add a really useful snippet of code that I use all the time when developing sites.

The following code uses your htaccess authentication but incorporates the "Satisfy Any" and "Allow" directives to allow google, CSS and XHTML validation via w3.org, and the web developers IP to access the site without being prompted for a password. Everyone else is prompted for a password.  

# Allow google and developers IP access without pw
AuthName "Authorized Users Only."
AuthType Basic
AuthUserFile /etc/httpd/conf/.htpasswd
require user testusr
Order deny,allow
Deny from all
Allow from 24.205.23.222
Allow from w3.org
Allow from htmlhelp.com
Allow from googlebot.com
Allow from google.com
Allow from google-analytics.com
Satisfy Any

More info/snippets

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.