Basic Auth not requested when rewrite rule exists
Dave Kennard
showerheadsuk at hotmail.com
Wed Dec 23 13:24:47 MSK 2009
Part of my Server config looks like this:
location /admin/ {
auth_basic "Restricted";
auth_basic_user_file /path/to/.htpasswd;
#rewrite any .xhtml page to page.php
rewrite ^/(.+)\.xhtml$ /$1.php last;
}
But when I go to mysite.com/admin/somefile.xhtml I don't get asked for
Authentification and the page will display.
If I comment out the rewrite rule then I do get asked for authentification.
Can anyone advise me on how to get authentification and the rewrite rule
working together?
Thanks
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20091223/fbbe28a7/attachment.html>
More information about the nginx
mailing list