HTTPS site points to same directory as HTTP?

Discussion in 'Installation/Configuration' started by lewis_saint, Mar 27, 2007.

  1. lewis_saint

    lewis_saint New Member

    If I enable SSL on mydomain.com, how come the virtual hosts for http://mydomain.com and https://mydomain.com point to the same place?
    How should I set it up so that users are prevented from accessing the 'secure content' insecurely?

    Regards,

    Lewis
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    http and https sites point always to the same place.

    You may use e.g. a apache rewrite rule for this.
     
  3. lewis_saint

    lewis_saint New Member

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Something like this should work:

    RewriteEngine On
    RewriteCond %{SERVER_PORT} !443
    RewriteRule (.*) https://mydomain.com/ [R]
     

Share This Page