views:

153

answers:

1

I am working on a beta site that is currently password protected. I want to experiment with Yahoo BOSS as a search solution, but I can't find an equivalent of Google's Webmaster Tools that allows me to enter the username/password to login.

I thought about modifying my Apache config to require password protection UNLESS the visit looks like it's coming from Yahoo's crawlers, but it doesn't seem to be working.

Here's my normal pw protection config...

AuthUserFile htpasswd
AuthName Login
AuthType Basic
require valid-user

I'm wishing there was a way to wrap this in an IF statement so that it would only be executed if the remote host is not crawl.yahoo.net.

Any advice from the Apache gods?

A: 

You can stack the "Require" statement with "Allow from" through use of the "Satisfy" directive. Here's a demo:

Satisfy Any

AuthUserFile /etc/apache2/htpasswd
AuthGroupFile /etc/apache2/htgroups
AuthType Basic
AuthName "Protected Area"
Require group protected

BrowserMatchNoCase webkit IS_WEBKIT
Allow from env=IS_WEBKIT

http://httpd.apache.org/docs/2.0/mod/mod_access.html

Gabe Martin-Dempesy