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:[EMAIL PROTECTED]
Sent: Wednesday, November 28, 2007 2:46 PM
To: [email protected]
Subject: Re: [EMAIL PROTECTED] Redirect HTTPS --> HTTP
On Nov 28, 2007 9:10 PM, Matt Bullock <[EMAIL PROTECTED]> 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
--
[EMAIL PROTECTED]
[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]