Skip to main content

How we Redirect website from HTTP to HTTPS from solidcp

In order to redirect your Website from Http to the Https protocol follow the below mentioned Steps.

  1. Install the SSL certificate on your website, if there is SSL certificate is not installed on your website and you have redirected it to the Https then your website will not be able to run.
  2. Login to your Solidcp Control panel with your username and password.

3. In the next screen, you will the icons for all the services you can manage from the SolidCP. To add the redirection of your website click on the Filemanager of the User under which website is added.

4. Here you will see the all created websites under this user click on the website name on which you want to set the redirection URL.

5. Once you click on the website you will see the three folders click on the website document root folder which Name is “wwwroot” under this folder you will see the “web.config” file click on the pencil sign in order to edit that file.

6. Enter the below mentioned website redirection code under your “web.config: file with the help of your developer team and save the file.

1. 
<rule name="RedirectToHTTPS" stopProcessing="true">
  <match url="(.*)" />
  <conditions>
    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
  </conditions>
  <action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="Permanent" />
</rule>



2. For redirecting requests from www to non-www ( i.e. https://example.com ):
<rule name="RedirectWwwToNonWww" stopProcessing="false">
  <match url="(.*)" />
  <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
    <add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" />
  </conditions>
  <action type="Redirect" url="https://{C:2}{REQUEST_URI}" redirectType="Permanent" />
</rule>


3. For redirecting requests from non-www to www ( i.e. https://www.example.com ):
<rule name="RedirectNonWwwToWww" stopProcessing="true">
  <match url="(.*)" />
  <conditions>
    <add input="{HTTP_HOST}" pattern="^domain.com$" />
  </conditions>
  <action type="Redirect" url="http://www.domain.com/{R:0}" redirectType="Permanent" />
</rule>

Leave a Reply