[users@httpd] Re: Rewrite and https

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

 



On Wed, Aug 03, 2005 at 03:17:11PM +0200, Krist van Besien wrote:
> So I have the following in my rewrite rulses:
> 
> 
> 
>         # If Portal is accessed over https add a query parameter so
> the portal knows.
>         RewriteCond     %{HTTPS}        on      [NC]
>         RewriteRule ^/([Pp]ortal.*)     $1?protocol=https       [QSA]
> 
> This doesn't seem to work though. This is what I see in the rewritelog
> when I request /Portal?cmd=login using https:
> 
> (3) applying pattern '^/([Pp]ortal.*)' to uri '/Portal'
> (4) RewriteCond: input='' pattern='on' => not-matched
> 
> It apears that the environment variable HTTPS is not set, even though
> the request is via https.

To check environment variables in rewrite conds, you need %{ENV:FOO}

To check arbitary HTTP headers, you need %{HTTP:FOO}

The syntax %{FOO} only works for certain internal variables explicitly
listed in the mod_rewrite documentation.

HTH,

Brian.

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