httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <>
Subject Re: [users@httpd] Redirect HTTPS --> HTTP
Date Sun, 02 Dec 2007 16:15:34 GMT
On Dec 2, 2007 11:36 AM, Matt Bullock <> wrote:
> I need to test more but, on the http vhost if you don't specify the
> SERVER_PORT !=81, then it wont work.

You realise what you are doing, do you?
RewriteCond %{SERVER_PORT} !=81 is a condition that will always be
true, as %{SERVER_PORT} is never "=81".
So this conditionis entirely unneeded.

>             # Easy name for users' public profiles
>           RewriteCond ! (.*)

Same here, another condition that will always be true. See your log file.

What is it acutally you are trying to achieve? You wanted to redirect
https to http. That is easy and trivial. You also seem to want to
redirect some https under some circumstances back to http. My first
question is, why? Is there some pressing need why your users can't
continue using https that justifies you and me going to so much
trouble? (Basically I would just run everything over https and be done
with it. The whole internet ought to be encrypted anyway).

But if you really want this, let's see if we can help you.
What is it that you want to achieven? From your example I guess it is
the following.

requests to
need to be forwarded to

and requests to
https:/ something not scripts/vendor/membership.php)
need to be directed back to http.

You have two virtual hosts, on port 80 and port 81, and port 81 gets
all https traffic from your loadbalancer.

<VirtualHost *:80>

RewriteRule ^/scripts/vendor/membership\.php$\.php [R=301,L]


<VirtualHost *:81>

RewriteCond $1    !/scripts/vendor/membership\.php
RewriteRule ^(.*)$$1 [R=301,L]


Try this, and look in your rewritelog whether these rules are actually
considered. A typing error somewhere else in your config might really
mess things up.


Bremgarten b. Bern, Switzerland
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message