Redirect Applies to All Virtual Hosts

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

 



I'm trying to do a simple redirect of http://www.mydomain.com to https://mydomain.com.  I am using the WAMP package wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b.

In the httpd.conf  for the domain in question, I added:

      <VirtualHost *:80>
          ServerName www.mydomain.com
          Redirect permanent / https://mydomain..com
      </VirtualHost>

I host about 10 unrelated domains on this same httpd.  With that block above, now every domain I host gets redirected to https://mydomain.com.  I wouldn't say I'm a blackbelt in virtual host config.  But I've been doing it for years.  And from what I understand, the redirect in the block above should ONLY apply if the http://www.mydomain.com request is received and definitely NOT if an http:XYZ.com request is received.  But obviously I'm missing something.  Why does this redirect apply globally to all domains? And more importantly, what do I change to get apache to only redirect this one url to https://?

Thx.

[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