Boyle Owen wrote:
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Georges Villot
Sent: Wednesday, November 29, 2006 5:50 PM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] rewrite + ssl

Hi,

I'm trying to rewrite all HTTP calls to HTTPS, except for the default page. So I wrote in the apache config:

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/$ - [S=1]

A request like http://server/ will immediately return the "default" page
(aka, the homepage) if and only if there exists a file in the
DocumentRoot directory whose name is declared in a "DirectoryIndex"
directive (or, by default, is "index.html"). If you are using any other
technique to redirect to a homepage, you will skip this rule and trigger
the switch to HTTPS. So check that...

RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]

it works, except that the SSL certificate is sent anyway,

That sounds contradictory. If "it works" means that the protocol remains
HTTP, then there can be no HTTPS session and no cert is sent. If the
session is HTTPS, why do you say "it works"? Maybe describe exactly what
"it works" means...

Hi Owen,

thank you for your response.
I'm using Mambo to manage the content of my website, and set a dynamic web page to be the default page on http://myserver.com/
The URL remains http://myserver.com/, however the certificate is sent.
I found why: there are some dynamic links for all images inside the default web page, so those will be accessed using HTTPS according to the RewriteRule rules.

thanks again for your help.
georges.


Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.
what I would like to avoid.

thank you in advance for any help,

georges.


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

This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

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

Reply via email to