From owner-freebsd-questions@FreeBSD.ORG Thu Mar 5 10:32:34 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07DCA1065672 for ; Thu, 5 Mar 2009 10:32:34 +0000 (UTC) (envelope-from dhaneshkk@hotmail.com) Received: from col0-omc4-s7.col0.hotmail.com (col0-omc4-s7.col0.hotmail.com [65.55.34.209]) by mx1.freebsd.org (Postfix) with ESMTP id DD16D8FC15 for ; Thu, 5 Mar 2009 10:32:33 +0000 (UTC) (envelope-from dhaneshkk@hotmail.com) Received: from COL106-W27 ([65.55.34.199]) by col0-omc4-s7.col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 5 Mar 2009 02:20:34 -0800 Message-ID: X-Originating-IP: [218.248.24.18] From: dhaneshk k To: Date: Thu, 5 Mar 2009 10:20:34 +0000 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 05 Mar 2009 10:20:34.0649 (UTC) FILETIME=[05420C90:01C99D7C] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: password protection for RewriteRule X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 10:32:34 -0000 List=3B I am using apache2.2 =20 I need to do a password protected access to a website eg www.mydoma= in.com I have this Vhost configuration in my httpd-Vhost.conf =20 ServerName mydomain.com RewriteEngine On RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.mydomain.= com:80/site1/VirtualHostRoot/$1 [L=2CP] ErrorLog /var/log/apache/mysite.com/error_log CustomLog /var/log/apache/mysite.com/access.log combined Now anybody in their browse type www.mydomain.com they = can view my site =2C but I want to make them to enter a username & pa= ssword to view the site . How can I do a password protected access to my site for this Rewrit= eRule based Vhost=20 ( 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 d= o that . Thanks in advance=20 Dhanesh. _________________________________________________________________ So many new options=2C so little time. Windows Live Messenger. http://www.microsoft.com/india/windows/windowslive/messenger.aspx=