httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] mod_rewrite and authentication
Date Mon, 04 Jun 2007 15:09:48 GMT
On 6/4/07, Chris Tankersley <chris.tankersley@heartland-ins.com> wrote:
> I've got a section of the website that I want only .htaccess
> authenticated users to be able to access, but I also want to push them
> to https://domain.name if they accidentally type in http://domain.name.
> If I throw both rules into my .htaccess I'm prompted to authenticate,
> then mod_rewrite fires, and then I have to authenticate again.
>
> Is there a way I can tell apache to do the mod_rewrite first, then
> authenticate?
>
> Apache 1.3.29 on OpenBSD 4.1

All bets are off when you use those old hacked-up openbsd apache
versions. You're often better off asking on an openbsd list.

But the first question to ask is: do you really need to use .htaccess?
If at all possible, you should put your directives in httpd.conf. Then
the problem is solved simply by putting the auth directives inside the
SSL <VirtualHost> and the redirect inside the non-ssl <VirtualHost>.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message