How do I force all visitors of my website from Plesk 12 to use secure connection (HTTPS) only?

Question

How do I force all visitors of my website from Plesk 12 to use secure connection (HTTPS) only?

solved 0
hmunezero 8 years 2016-03-06T02:43:02+00:00 1 Answer 921 views 1

Answer ( 1 )

    0
    2016-03-06T04:30:22+00:00

    After adding an SSL certificate to your domain (eg: yourdomaine.com). You can force all visitors of your website to use secure connection (HTTPS) through two steps described here-under:

    1) Make sure that mod_rewrite Apache module is enabled

    # httpd -t -D DUMP_MODULES | grep rewrite
    Syntax OK
    rewrite_module (shared)

    2) Go to Plesk > Domains > select yourdomain.com > then select Apache $ ngins settings > sdd the code below to Additional directives for HTTP :

    <IfModule mod_rewrite.c>
           RewriteEngine on
           RewriteCond %{HTTPS} !=on
           RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,QSA]
    </IfModule>

    Best answer

Leave an answer