Warning: session_start(): open(/var/cpanel/php/sessions/alt-php74/sess_db32db5839536cf7a69afa0220aa09f6, O_RDWR) failed: No such file or directory (2) in /home/xsofthost/public_html/help/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 358

Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/alt-php74) in /home/xsofthost/public_html/help/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 358
How to Redirect website from HTTP to HTTPS on IIS7 - XsoftHost

How to Redirect website from HTTP to HTTPS on IIS7

How to configure IIS Redirect HTTP to HTTPS

To Configure IIS7 ,IIS8 to force using HTTPS for website follow these steps

  1. Make sure that Microsoft URL Rewrite Module installed on your server
  2. Install your SSL certificate in IIS 7 and bind it to your website or if you already install the SSL you can skip this step.
  3. Make sure Require SSL is NOT checked under SSL Settings for your website (uncheck the boxes that are checked in this screenshot)


    IIS Redirect HTTP to HTTPS

  4. Locate your web.config file on your root folder of your website and edit the file and locate <system.webServer> section and add the following after that section

    <rewrite>

    <rules>

    <rule name=”http to https” stopProcessing=”true”>

    <match url=”(.*)” />

    <conditions>

    <add input=”{HTTPS}” pattern=”^OFF$” />

    </conditions>

    <action type=”Redirect” url=”https://{HTTP_HOST}/{R:1}” redirectType=”Temporary” />

    </rule>

    </rules>

    </rewrite>

  5. Now you can check if your website by enter www.youdomain.com in the browser ,It should redirect to the https version.
Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp

Related Posts