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.

Reply via email to