password protection for RewriteRule
dhaneshkk at hotmail.com
Thu Mar 5 02:32:34 PST 2009
I am using apache2.2
I need to do a password protected access to a website eg www.mydomain.com
I have this Vhost configuration in my httpd-Vhost.conf
RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.mydomain.com:80/site1/VirtualHostRoot/$1 [L,P]
CustomLog /var/log/apache/mysite.com/access.log combined
</VirtualHost>Now anybody in their browse type www.mydomain.com they can view my site , but I want to make them to enter a username & password to view the site .
How can I do a password protected access to my site for this RewriteRule based Vhost
( I know that I can do .htaccess & .htpasswd based authentication for directories in apache . )
But for RewriteRule is it possible ? How ?
I appreciate very much for your valuable suggestions & hints to how to do that .
Thanks in advance
So many new options, so little time. Windows Live Messenger.
More information about the freebsd-questions