Redirect HTTP to HTTPS

  1. Open the <IHS/Apache install dir>/conf/httpd.conf file with a text editor.

  2. Enable the mod_rewrite.<so|dll> by uncommenting the line:

    #LoadModule rewrite_module modules/mod_rewrite.<so|dll>
    

    to

    LoadModule rewrite_module modules/mod_rewrite.<so|dll>
    
  3. Append the following configuration block to the end of the file.

    RewriteEngine on
    RewriteCond %{SERVER_PORT} =80
    RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]