I don't use htaccess 'basic auth' often.
In fact it will usually only be to lock off a site while in development.
So I added it on a domain and the log in dialog box appears fine and logs me in ok..
But if I sit there and click the 'cancel' box on the log in as fast as I can, then the log in goes away and I can see my page in its entirety.
No style or images but the text is there.
I'm thinking this is because the .htaccess has the mod_rewrite lines in there, so they are being called prior to the basic auth part.
I tried moving the auth stuff higher up but made no difference and then in IE I couldn't even cancel to see the empty "you do not have permission etc. " screen
The rewrite lines end [QSA,NE,NC,L] so I'm guessing the culprit is the 'L' - but I need that in there.
RewriteEngine on
RewriteBase /
Options +FollowSymlinks
RewriteRule ^([A-Za-z0-9\?=&_-]+)/([A-Za-z0-9\?=&_-]+)$ index.php?sc=$1&pg=$2 [QSA,NE,NC,L]
RewriteRule ^([A-Za-z0-9\?=&_-]+)$ index.php?pg=$1 [QSA,NC,L]
AuthType Basic
AuthName "preview"
AuthUserFile "/home/xyz/.htpasswds/public_html/passwd"
require valid-user
It's not mega important here, but I'd rather it didn't do this - any ideas?