Re: mod_rewrite and authentication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/4/07, Chris Tankersley <chris.tankersley@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux