httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georges Villot <gvil...@free.fr>
Subject [users@httpd] Re: rewrite + ssl
Date Mon, 04 Dec 2006 06:42:59 GMT
Boyle Owen wrote:
>> -----Original Message-----
>> From: news [mailto:news@sea.gmane.org] On Behalf Of Georges Villot
>> Sent: Wednesday, November 29, 2006 5:50 PM
>> To: users@httpd.apache.org
>> Subject: [users@httpd] 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: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>  
>  
> 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: 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