httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] mod_rewrite and authentication
Date Mon, 04 Jun 2007 15:09:48 GMT
On 6/4/07, Chris Tankersley <> 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 if they accidentally type in
> 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>.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message