Re: Using AuthName with mod_rewrite

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

 



> When I use
> RewriteEngine on
> RewriteCond %{REMOTE_USER} ^

That RegEx is always true (so you can skip the condition). To check
for at least one character present, use a '.', i.e.
%{REMOTE_USER} .

But anyway...

> RewriteRule  ^/$   http://localhost/home.seam?userid=%{REMOTE_USER} [L]

That is per-server context (which is a good idea to use) but auth and
access checks are done on a per-directory basis. That means, that the
ENV cannot be present in per-server context, i.e. before auth is being
processed. There are two possible solutions:

Use an URL-based subrequest in per-server context do determine the
value of that ENV:
RewriteRule  ^/$ http://localhost/home.seam?userid=%{LA-U:REMOTE_USER} [R,L]

-or-
use the rule in per-directory context

<Directory /path/to/docroot>
RewriteEngine on
RewriteRule  ^$ http://localhost/home.seam?userid=%{REMOTE_USER} [R,L]
</Directory>

Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-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