RE: rewrite + ssl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: news [mailto:news@xxxxxxxxxxxxx] On Behalf Of Georges Villot
> Sent: Wednesday, November 29, 2006 5:50 PM
> To: users@xxxxxxxxxxxxxxxx
> Subject:  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...

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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
 
 
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux