[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-users
Subject:    Re: [users@httpd] Redirect https' 404 to http...
From:       Tom Evans <tevans.uk () googlemail ! com>
Date:       2011-11-28 14:26:51
Message-ID: CAFHbX1Lk8tJPncdBqB=VUNx0Dh9UXtUhUX7gmiOJFqC8utTuZA () mail ! gmail ! com
[Download RAW message or body]

On Mon, Nov 28, 2011 at 11:00 AM, John Doe <jdmls@yahoo.com> wrote:
> Ok.=C2=A0 We will have to weight the additional load...
> I understand it will be doubled in case of a 200 (low occurences).
> But for all the 404s, it is only configuration parsing in RAM, plus
> one "file not found" on the filesystem, right?
>

No, it will be doubled in all cases:

In all cases, there will be one initial SSL request made. In the
rewrite phase (early), it will use a sub-request to see what would be
returned for that URI. Once it has that information, it throws it all
away, and either then issues a redirect to HTTP, or fetches the
resource again.

I think the sub request would avoid an SSL request, and be entirely
internal, but I'm not 100% sure on that.

Thinking about it, you may need to tweak the rules so that it is like so:

RewriteCond %{HTTPS} On
RewriteCond ! %{IS_SUBREQ} true
RewriteCond ! -U %{REQUEST_URI}
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

IE exclude subrequests from recursively invoking the lookahead.

Cheers

Tom

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic