Well, you have the ReWrite rule INSIDE the destination SSL VH config..  A
bit useless..

The ReWrite needs to be inside the VH configs that NEED to redirect - such
as 10.0.0.40:80, Servername family.sancho2k.net

As for why http://family.sancho2k.net is sending a webpage with a meta-tag
redirect - What is actually being server for that address ???
It is probably your default page you have put there..

Rgds
Jeff

----- Original Message -----
From: "Sancho2k.net Lists" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 18, 2003 2:39 PM
Subject: HTTP --> HTTPS rewrite not working


> Greetz all,
>
> I'm trying to force one of my virtual hosts to use https when http is
> requested by a mod_rewrite rule. I am testing the implementation using
> curl.
>
> When I specify https in my url, curl will grab the correct page:
>
> [root@molodetz:~]# curl https://family.sancho2k.net
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Sancho2k.net Family - Our family web page</title>
>
> But when I throw http://family.sancho2k.net ...
>
> [root@molodetz:~]# curl http://family.sancho2k.net
> <html><head><meta http-equiv="refresh" content="0;
> URL=http://www.sancho2k.net/index.php";></head></html>
>
> This is my VirtualHost configuration:
>
> NameVirtualHost 10.0.0.40:443
> <VirtualHost 10.0.0.40:443>
>      ServerName                  family.sancho2k.net
>      DocumentRoot                /var/www/htdocs/fam_public_html
>      ServerAdmin                 [EMAIL PROTECTED]
>      CustomLog                   logs/family/access_log combined
>      ErrorLog                    logs/family/error_log
>      TransferLog                 logs/family/ssl_access_log
>      LogLevel                    debug
>      SSLEngine                   on
>      SSLCertificateFile          /var/www/conf/certs/family/server.crt
>      SSLCertificateKeyFile       /var/www/conf/certs/family/server.key
>      UseCanonicalName            off
>      RewriteEngine               on
>      RewriteCond                 %{SERVER_PORT}   !^443$
>      RewriteRule                 ^/(.*)   https://%{SERVER_NAME}/$1 [L,R]
>      #SSLVerifyClient            require
>      #SSLVerifyDepth             1
>      #SSLCACertificateFile       conf/certs/cacert.crt
> </VirtualHost>
>
> Why is it redirecting my requests to www.sancho2k.net? This is a
> seperate virtual host I have set up:
>
> NameVirtualHost 10.0.0.2:80
> <VirtualHost 10.0.0.2:80>
>      ServerName                  www.sancho2k.net
>      DocumentRoot                /var/www/htdocs
>      ServerAdmin                 [EMAIL PROTECTED]
>      SSLEngine                   off
> </VirtualHost>
>
>
> Thanks in advance for help.
>
> DS
>
> ______________________________________________________________________
> Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
> User Support Mailing List                      [EMAIL PROTECTED]
> Automated List Manager                            [EMAIL PROTECTED]
>

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to