httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Skea <s...@acm.org>
Subject Re: Mod-rewrite / mod-env weirdness
Date Fri, 01 Aug 2003 09:17:11 GMT
<html>
<font size=3>At 18:37 31/07/2003, you wrote:<br>
<br>
<blockquote type=cite cite>* Alan Skea wrote:<br>
<br>
&gt; SetEnv SSL 1<br>
...<br>
&gt; RewriteEngine on<br>
&gt; RewriteCond
%{ENV:SSL}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!=1<br>
&gt; RewriteCond %{REQUEST_URI}&nbsp;&nbsp;&nbsp;
!^/(img)|(ssi)|(obj)/<br>
&gt; RewriteRule
^/(.*)$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/redir<br>
<br>
SetEnv variables will we set much later than mod_rewrite can check them,
so<br>
the successful requests, you're seeing are probably subrequests, caused
be a<br>
handler.<br>
<br>
mod_ssl should set the HTTPS variable (on or off) which is for that
purpose.<br>
You should use this one.<br>
<br>
nd</blockquote><br>
Ah thanks for that - I should have expected that mod_ssl would be helping
me here.<br>
<br>
However ... now I'm using the HTTPS variable and getting exactly the same
behaviour.&nbsp; The problem is only in the top-level request - in
subrequests, as you say, the variables have been initialised.&nbsp; Also
it's only the first time that the virtual server is used in a given httpd
process.&nbsp; Subsequent requests to the same URL in the same httpd
process are OK and the top-level request has the variable set.&nbsp; It
looks to me like there is some curiosity in the way that a virtual server
gets initialised.<br>
<br>
If I can't rely on &quot;env&quot; variables at that point in the
processing of a request, how can I tell if I'm in secure mode or
not?<br>
<br>
&nbsp;-_-_ Alan.<br>
</font></html>

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message