You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matt Bullock <mb...@root9.com> on 2007/11/28 21:10:23 UTC

[users@httpd] Redirect HTTPS --> HTTP

Thanks everyone for helping me with my redirect problems using a
hardware load balancer.  I have redirects from http to https working
perfectly, but now I can't seem to get the https back to http working.

 

Here are the rules I am using:

 

<vhost:80>

 

RewriteCond {SERVER_PORT} !=81

RewriteCond %{REQUEST_URI} ^/scripts/vendor/new_package\.php$

RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=301,L]

 

</vhost>

 

<vhost:81>

 

RewriteCond {SERVER_PORT} =81

RewriteCond %{REQUEST_URI} !^/scripts/vendor/new_package\.php$

RewriteRule ^.*$ http://www.domain.com%{REQUEST_URI} [R=301,L]

 

--or-

 

RewriteCond {SERVER_PORT} !=80

RewriteCond %{REQUEST_URI} !^/scripts/vendor/new_package\.php$

RewriteRule ^.*$ http://www.domain.com%{REQUEST_URI} [R=301,L]

 

</vhost>

 

I can't seem to get the rule to change the request back to http
though... any ideas?

 

Thanks,

 

Matt 

 


Re: [users@httpd] Redirect HTTPS --> HTTP

Posted by Krist van Besien <kr...@gmail.com>.
On Nov 30, 2007 9:13 PM, Matt Bullock <mb...@root9.com> wrote:
> No, just abbreviating things to specify the virtual host port
> assignments.

Please don't do that. Give us _actual_ fragments from your config.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


RE: [users@httpd] Redirect HTTPS --> HTTP

Posted by Matt Bullock <mb...@root9.com>.
No, just abbreviating things to specify the virtual host port
assignments.

Matt

-----Original Message-----
From: Krist van Besien [mailto:krist.vanbesien@gmail.com] 
Sent: Friday, November 30, 2007 11:42 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Redirect HTTPS --> HTTP

On Nov 28, 2007 9:10 PM, Matt Bullock <mb...@root9.com> wrote:
>
> Here are the rules I am using:
>
>
>
> <vhost:80>
>
>
>
> RewriteCond {SERVER_PORT} !=81
>
> RewriteCond %{REQUEST_URI} ^/scripts/vendor/new_package\.php$
>
> RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=301,L]
>
>
>
> </vhost>

Just one question. Is this literally what you have in your httpd.conf?
 <vhost> is not a valid apache directive.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


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


Re: [users@httpd] Redirect HTTPS --> HTTP

Posted by Krist van Besien <kr...@gmail.com>.
On Nov 28, 2007 9:10 PM, Matt Bullock <mb...@root9.com> wrote:
>
> Here are the rules I am using:
>
>
>
> <vhost:80>
>
>
>
> RewriteCond {SERVER_PORT} !=81
>
> RewriteCond %{REQUEST_URI} ^/scripts/vendor/new_package\.php$
>
> RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=301,L]
>
>
>
> </vhost>

Just one question. Is this literally what you have in your httpd.conf?
 <vhost> is not a valid apache directive.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


Re: [users@httpd] Redirect HTTPS --> HTTP

Posted by Krist van Besien <kr...@gmail.com>.
On Dec 2, 2007 11:36 AM, Matt Bullock <mb...@root9.com> 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
http:/www.mydomain.com/scripts/vendor/membership.php
need to be forwarded to
https:/www.mydomain.com/scripts/vendor/membership.php

and requests to
https:/www.mydomain.com( 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$
https://www.domain.com/scripts/vendor/membership\.php [R=301,L]

</VirtualHost>


<VirtualHost *:81>

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

</VirtualHost>

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.

Krist









-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


RE: [users@httpd] Redirect HTTPS --> HTTP

Posted by Matt Bullock <mb...@root9.com>.
I need to test more but, on the http vhost if you don't specify the
SERVER_PORT !=81, then it wont work.

Besides the http/https rules, here are the only other rules that we are
using:

	    # Easy name for users' public profiles
          RewriteCond ! (.*)
          RewriteRule
\.(html|php|css|js|jpg|gif|png|pdf|txt|swf|flv|wmv|wav|htm)$ - [S=1]
          RewriteRule ^([^/]+) publicprofile.php?webprofileurl=$1
[L,QSA]

          # Force www if not present
          RewriteCond %{HTTP_HOST} ^domain\.com$
          RewriteRule ^.*$ http://www.domain.com%{REQUEST_URI} [R=301,L]

Thanks,

Matt

-----Original Message-----
From: Krist van Besien [mailto:krist.vanbesien@gmail.com] 
Sent: Saturday, December 01, 2007 2:23 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Redirect HTTPS --> HTTP

On Nov 30, 2007 9:27 PM, Matt Bullock <mb...@root9.com> wrote:

> I see the issue with server_port =81 not being matched, but I have
tried
> removing that directive, as well as changing it to !=81.  I don't
really
> have any leads as to what to try next.

You are testing wether or not the server port is =81 or =80, but since
it is either 80 or 81 this never matches.

You need to realise that the RewriteCond ought to have been:
RewriteCond {SERVER_PORT} !81
(Since you don't need a = sign, I'm sorry I didn't find this out sooner)
You don't need this rewritecond however, as you allready take care of
sorting on port numbers by using virtual hosts.

However, I also see the following in your log:

domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (2) init rewrite
engine with requested uri /error/include/top.html
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (3) applying
pattern '\.(html|php|css|js|jpg|gif|png|pdf|txt|swf|flv|wmv|wav|htm)$'
to uri '/error/include/top.html'
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (4) RewriteCond:
input='!' pattern='(.*)' => matched
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (1) pass through
/error/include/top.html

Do you have other rewrite rules?

Krist









-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


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


Re: [users@httpd] Redirect HTTPS --> HTTP

Posted by Krist van Besien <kr...@gmail.com>.
On Nov 30, 2007 9:27 PM, Matt Bullock <mb...@root9.com> wrote:

> I see the issue with server_port =81 not being matched, but I have tried
> removing that directive, as well as changing it to !=81.  I don't really
> have any leads as to what to try next.

You are testing wether or not the server port is =81 or =80, but since
it is either 80 or 81 this never matches.

You need to realise that the RewriteCond ought to have been:
RewriteCond {SERVER_PORT} !81
(Since you don't need a = sign, I'm sorry I didn't find this out sooner)
You don't need this rewritecond however, as you allready take care of
sorting on port numbers by using virtual hosts.

However, I also see the following in your log:

domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (2) init rewrite
engine with requested uri /error/include/top.html
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (3) applying
pattern '\.(html|php|css|js|jpg|gif|png|pdf|txt|swf|flv|wmv|wav|htm)$'
to uri '/error/include/top.html'
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (4) RewriteCond:
input='!' pattern='(.*)' => matched
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (1) pass through
/error/include/top.html

Do you have other rewrite rules?

Krist









-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


RE: [users@httpd] Redirect HTTPS --> HTTP

Posted by Matt Bullock <mb...@root9.com>.
Here is the output of log level 9:


70.104.12.9 - - [30/Nov/2007:12:15:49 --0800]
[www.domain.com/sid#55555585b900][rid#555555b01ad0/initial/redir#1] (4)
RewriteCond: input='{SERVER_PORT}' pattern='=81' => not-matched
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b01ad0/initial/redir#1] (3)
applying pattern '^.*$' to uri '/error/HTTP_NOT_FOUND.html.var'
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b01ad0/initial/redir#1] (4)
RewriteCond: input='{SERVER_PORT}' pattern='=81' => not-matched
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b01ad0/initial/redir#1] (3)
applying pattern '^.*$' to uri '/error/HTTP_NOT_FOUND.html.var'
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800]
[www.domain.com/sid#55555585b900][rid#555555b01ad0/initial/redir#1] (1)
pass through /error/HTTP_NOT_FOUND.html.var
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (2) init rewrite
engine with requested uri /error/include/top.html
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (3) applying
pattern '\.(html|php|css|js|jpg|gif|png|pdf|txt|swf|flv|wmv|wav|htm)$'
to uri '/error/include/top.html'
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (4) RewriteCond:
input='!' pattern='(.*)' => matched
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555b7c6a8/subreq] (1) pass through
/error/include/top.html
70.104.12.9 - - [30/Nov/2007:12:15:49 --0800] [www.
domain.com/sid#55555585b900][rid#555555c8c1f8/subreq] (2) init rewrite
engine with requested uri /error/include/bottom.html

I see the issue with server_port =81 not being matched, but I have tried
removing that directive, as well as changing it to !=81.  I don't really
have any leads as to what to try next.

Thanks for your help,

Matt

-----Original Message-----
From: Krist van Besien [mailto:krist.vanbesien@gmail.com] 
Sent: Friday, November 30, 2007 11:44 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Redirect HTTPS --> HTTP

On Nov 30, 2007 7:51 PM, Matt Bullock <mb...@root9.com> wrote:

> Are there any clues as to why this wont work?  Is there anything else
I
> can check, raise the log level?

Raise loglevel. You'll see what gets matched and what not.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


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


Re: [users@httpd] Redirect HTTPS --> HTTP

Posted by Krist van Besien <kr...@gmail.com>.
On Nov 30, 2007 7:51 PM, Matt Bullock <mb...@root9.com> wrote:

> Are there any clues as to why this wont work?  Is there anything else I
> can check, raise the log level?

Raise loglevel. You'll see what gets matched and what not.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


RE: [users@httpd] Redirect HTTPS --> HTTP

Posted by Matt Bullock <mb...@root9.com>.
Krist,

Every option I have tried has had no effect on changing the url back to
http from https so far.  

The latest is this:

RewriteCond {SERVER_PORT} !=81
RewriteCond %{REQUEST_URI} ^/scripts/vendor/membership\.php$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

The above will write the http to https fine.

Then I try and change back to http:

RewriteCond {SERVER_PORT} =81
RewriteCond %{REQUEST_URI} !^/scripts/membership\.php$
RewriteRule ^.*$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

I have tried with and without the SERVER_PORT directive, I have tried
using {SERVER_PORT} !=80, and also without server_port./

Results in rewrite log level 2 are this:

70.104.12.9 - - [30/Nov/2007:09:45:00 --0800]
[www.domain.com/sid#555555818a68][rid#555555b5df18/initial] (2) init
rewrite engine with requested uri /scripts/vendor/welcome.php
70.104.12.9 - - [30/Nov/2007:09:45:00 --0800] [www.
domain.com/sid#555555818a68][rid#555555b5df18/initial] (1) pass through
/scripts/vendor/welcome.php
70.104.12.9 - - [30/Nov/2007:09:45:01 --0800] [www.
domain.com/sid#555555818a68][rid#55555590ec38/initial] (2) init rewrite
engine with requested uri /resource/themes/default/css/learn.css.php
70.104.12.9 - - [30/Nov/2007:09:45:01 --0800] [www.
domain.com/sid#555555818a68][rid#55555590ec38/initial] (1) pass through
/resource/themes/default/css/learn.css.php
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#5555563a68c8/initial] (2) init rewrite
engine with requested uri /scripts/vendor/blank.php
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#5555563a68c8/initial] (1) pass through
/scripts/vendor/blank.php
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#555555b5ee30/initial/redir#1] (2) init
rewrite engine with requested uri /error/HTTP_NOT_FOUND.html.var
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#555555b5ee30/initial/redir#1] (1) pass
through /error/HTTP_NOT_FOUND.html.var
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#555555a2dbd8/subreq] (2) init rewrite
engine with requested uri /error/include/top.html
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#555555a2dbd8/subreq] (1) pass through
/error/include/top.html
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#555555e810e8/subreq] (2) init rewrite
engine with requested uri /error/include/bottom.html
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#555555e810e8/subreq] (1) pass through
/error/include/bottom.html
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#5555563b53a8/subreq] (2) init rewrite
engine with requested uri /error/contact.html.var
70.104.12.9 - - [30/Nov/2007:09:45:03 --0800] [www.
domain.com/sid#555555818a68][rid#5555563b53a8/subreq] (1) pass through
/error/contact.html.var
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#555555a45418/initial] (2) init rewrite
engine with requested uri /scripts/vendor/bt.css
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#555555a45418/initial] (1) pass through
/scripts/vendor/bt.css
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#55555590f9f8/initial/redir#1] (2) init
rewrite engine with requested uri /error/HTTP_NOT_FOUND.html.var
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#55555590f9f8/initial/redir#1] (1) pass
through /error/HTTP_NOT_FOUND.html.var
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#555555a4d458/subreq] (2) init rewrite
engine with requested uri /error/include/top.html
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#555555a4d458/subreq] (1) pass through
/error/include/top.html
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#555555a3bc48/subreq] (2) init rewrite
engine with requested uri /error/include/bottom.html
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#555555a3bc48/subreq] (1) pass through
/error/include/bottom.html
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#555555a51478/subreq] (2) init rewrite
engine with requested uri /error/contact.html.var
70.104.12.9 - - [30/Nov/2007:09:45:05 --0800] [www.
domain.com/sid#555555818a68][rid#555555a51478/subreq] (1) pass through
/error/contact.html.var

Are there any clues as to why this wont work?  Is there anything else I
can check, raise the log level?

Thanks,

Matt


-----Original Message-----
From: Krist van Besien [mailto:krist.vanbesien@gmail.com] 
Sent: Wednesday, November 28, 2007 2:46 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Redirect HTTPS --> HTTP

On Nov 28, 2007 9:10 PM, Matt Bullock <mb...@root9.com> wrote:

> I can't seem to get the rule to change the request back to http
though... any
> ideas?

First of all, you don't need the "RewriteCond {SERVER_PORT} !=80 " and
similar conditions, as your virtual host allready takes care of
shielding your rules for requests to the other port.

Secondly, if rules are not doing what you expect them to do, start by
enabling a rewritelog, with high enough rewriteloglevel. This will
give you tons of information, and if this still leaves you without a
solution you can always post excerpts from your rewrite log here on
the list.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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


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


Re: [users@httpd] Redirect HTTPS --> HTTP

Posted by Krist van Besien <kr...@gmail.com>.
On Nov 28, 2007 9:10 PM, Matt Bullock <mb...@root9.com> wrote:

> I can't seem to get the rule to change the request back to http though… any
> ideas?

First of all, you don't need the "RewriteCond {SERVER_PORT} !=80 " and
similar conditions, as your virtual host allready takes care of
shielding your rules for requests to the other port.

Secondly, if rules are not doing what you expect them to do, start by
enabling a rewritelog, with high enough rewriteloglevel. This will
give you tons of information, and if this still leaves you without a
solution you can always post excerpts from your rewrite log here on
the list.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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: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