httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Bullock" <mbull...@root9.com>
Subject RE: [users@httpd] Redirect HTTPS --> HTTP
Date Sun, 02 Dec 2007 10:36:04 GMT
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 <mbullock@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


Mime
View raw message