Re: Using AuthName with mod_rewrite

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

 



Thank you Bob. Adding the following lines in the conf file made it work.

<Directory /var/www/html>
RewriteEngine on
RewriteRule  ^$ http://localhost/bob/ravi.html?userid=%{REMOTE_USER} [R,L]
</Directory>


Regards.

On Thu, December 18, 2008 3:19 am, Bob Ionescu wrote:
>> 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
>
>


-- 
Kind regards.

Ravi Verma
Chief Executive Officer
Telecommand Software and Services
3175 Sunset Blvd, Suite 104-B
Rocklin, CA 95677
Phone:9167053261
Fax:9169142008
www.telecommand.com

---------------------------------------------------------------------
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