Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Websites not redirecting to HTTPS

Hello all,


I recently upgraded from Lion to Mountain Lion server and I am having a problem with websites. I have a few websites that use SSL but they are not being redirected to HTTPS.


For example: I have webmail.domain.com which uses SSL. If I type just webmail.domain.com into Safari, I get redirected to my server's default page. If I explicitly type in https://webmail.domain.com then I end up in the right place.


In Lion, if I typed in just webmail.domain.com it would automatically redirect me to HTTPS, but that doesn't seem to be working in Mountain Lion. Any ideas?

Mac mini Server (Mid 2011), Mac OS X (10.7.4)

Posted on Sep 25, 2012 5:20 PM

Reply
6 replies

Sep 28, 2012 1:08 PM in response to MplsEE08

Hi,


The solution to your question is as follows:

  1. Create http://webmail.domain.com as a new server (a virtual server)
  2. Make sure is serves over port 80 only
  3. Make sure it does not use the SSL cert
  4. Create https://webmail.domain.com as a new server
  5. Make sure is serves over port 443 only
  6. Make sure it uses the SSL cert.
  7. Go back to the http://webmail.domain.com, create a alias
  8. Type: Redirect Match
  9. Pattern: ^/(?!/)(.*)
  10. Path: https://webmail.domain.com


What this does is redirect any traffic from http://webmail.domain.com to https://webmail.domain.com

For more info please google for "apache redirect"

Oct 12, 2012 7:52 AM in response to MplsEE08

I am not sure about Lion but the redirection did not work automatically in Snow Leopard. So like I did in Snow Leopard I create two website:


1. https://example.com, select SSL certificate, port 443 (it change automatically if you select certificate first)

2. http://example.com, no certificate, port 80 and add redirection: For "When users visit:" choose "This website" and for "Redirect them to:" coose "example.com (SSL)"

Websites not redirecting to HTTPS

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.