RewriteCond question

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

 



I'm dealing with a site that is accessed via https://domain.gov  The
certificate is for "domain.gov"  I akready have a working rule to catch
http://domain.gov/ and rewrite to https://domain.gov/  I also got
http://www.domain.gov/ caught and rewritten with:

RewriteCond %{http_host} ^www\.domain\.gov [NC] 
RewriteRule ^(.*)$ https://domain.gov/$1 [R=301]

However, attempts to access https://www.domain.gov/ are still an issue.
I tried:

RewriteCond %{https} ^www\.domain\.gov [NC]
RewriteRule ^(.*)$ https://domain.gov/$1 [R=301]

But that didn't work (I didn't really expect it to, but it was worth a
try!)

What magic sauce do I need to catch and rewrite that attempt?

-- 
***********************************************************************
* John Oliver                             http://www.john-oliver.net/ *
*                                                                     *
***********************************************************************

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