httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] Problems with rewrite and SSL
Date Thu, 22 May 2008 14:01:42 GMT
On Thu, May 22, 2008 at 12:41 PM, Daniel Ruiz <daniel.ruiz@caos.uab.es> wrote:

> Can anyone help me!?!?!?!?!?!

You probably should use %{HTTP_HOST} in stead of %{SERVER_NAME}.
HTTP_HOST is the variable where the "host" header is stored.

A note about this part of your config:

>    <VirtualHost A:80>
>           ...
>            ServerName A
>            RewriteEngine On
>            RewriteLog /var/log/apache2/http_rewrite_log
>            RewriteLogLevel 9
>            RewriteCond %(SERVER_PORT) !^443$
>            RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
>           ...
>    </VirtualHost>

You don't need the rewritecond here as SERVER_PORT will always be 80...

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


Mime
View raw message