Is it possible to call basic authentication depending on URI input with mod_rewrite?
For eg. if user visits http://example.com/membersarea
then require user to login using apache's basic auth
So code should look like
- Code: Select all
ReqriteEngine On
RewriteCond %{REQUEST_URI} ^membersarea/?$
AuthName "Members Only"
AuthType Basic
require valid-user
...
But that doesn't work, it prompts login box wherever I go
the 'membersarea' folder doesn't exist and shouldn't.
I guess that's not possible?
Thanks in advance guys.