RE: URI / SSL help please

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

 



I have this in my conf:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Now that code chunk kicks all :80 traffic to https (:443) .... I need a
rule that will also kick http://www. Over to https://

If someone access the site by http://www.whatever.com, I want it to goto
https://%{HTTP_HOST}%{REQUEST_URI}

-----Original Message-----
From: jslive@xxxxxxxxx [mailto:jslive@xxxxxxxxx] On Behalf Of Joshua
Slive
Sent: Monday, May 07, 2007 3:36 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  URI / SSL help please

On 5/7/07, Ryan Huff <Ryan_Huff@xxxxxx> wrote:
>
>
> Okay I have SSL up and working just fine on Apache 2.2.4.
>
>     I have my Cert for 'mydomain.com' however when people access 
> 'www.mydomain.com' the browser says that the CA didn't issue the 
> certificate for the domain that the browser is accessing.  Obviously 
> this is due to the 'www.'.
>
>     Now, I need to know how to fix that?  How do I truncate 'www.' out

> of the URI before Apache processes the request?  Or maybe its a
redirect?
> Please help ... I am going NUTS!
>
> P.S
> I have a mod_rewrite condition that will kick all :80 over to :443 (so

> if you access the site using http:// it automatically goes to 
> https://)

If people are requesting directly (or linking to)
https://www.mydomain.com/, then you are screwed. In order to redirect,
you first need the request to go through the SSL negotiation, so they
will get the warning message.

If people are requesting http://www.mydomain.com/, then you should
simply change your rewrite rules to send them over to
https://mydomain.com/. If you need help with that, you'd need to provide
more details about what you are doing.

Joshua.

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




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