Howto redirect from http to https

Discussion in 'Tips/Tricks/Mods' started by Hans, Sep 7, 2007.

  1. Hans

    Hans Moderator ISPConfig Developer

    When you've installed a SSL certificate for a website on your ISPConfig server according the howto here: the website with the SSL certificate can be visited in two ways: https://www.yourdomain.tld AND http://www.yourdomain.tld.

    For security reasons, probably you want to redirect from http to https.
    This can be done by putting the next couple of lines within the Apache directives field within ISPConfig for your website with SSL:

    RewriteEngine on
    RewriteCond %{SERVER_PORT} =80
    RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI}
    Last edited: Sep 7, 2007

Share This Page