httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KK CHN <kkchn...@gmail.com>
Subject [users@httpd] how to do a Password protection for a RewriteRule based VirtualHost
Date Thu, 05 Mar 2009 10:01:42 GMT
<VirtualHost *:80>
ServerName  mydomain.com
RewriteEngine On
RewriteRule ^/(.*)
http://127.0.0.1:8081/VirtualHostBase/http/www.mydomain.com:80/site1/VirtualHostRoot/$1
[L,P]
ErrorLog /var/log/apache/mysite.com/error_log
CustomLog /var/log/apache/mysite.com/access.log combined
</VirtualHost>



Now  every one can access the site   mydomain.com


But I want to restrict this access  to    a  group of members  ..
when they type www.mydomain.com
it should   promt for a username and password  ..


I know I can do it  for  directories  but is it possible for
RewriteRule section ?  How can we do it ?


Any hints & suggestions most welcome

Thanks in advance
KK

Mime
View raw message