nader's thinkery
Your thoughts, bookmarks, todo lists, notes and things. Without the hassle.

Bypass .htaccess authentication for facebook debug tools

Bypass .htaccess authentication for facebook debug tools

development facebook apache Jun 3, 2013

# First set an environment variable for Facebook
SetEnvIf User-Agent ^facebookexternalhit.*$ Facebook=1

# In your password authentication on directory level, allow Facebook ...

        AllowOverride All         AuthType Basic         AuthName "Requires Authentication"         AuthUserFile XXX         Require valid-user         Order deny,allow         Deny from all         Allow from 127.0.0.1         Allow from XXX.XXX.XXX.XX         Allow from XXX.XXX.XXX.XX         Allow from env=Facebook         Satisfy Any