Add redirect to webconfig Print

  • 0

 
If the site does not switch to https after installing the certificate, you can help control the domain towards https.

Read more about this: Read more about our SSL here

The code should be in webconfig between the <system.webServer> and </system.webServer> tags

In that file, enter the following code:

<Rewrite>
   <Rules>
     <rule name = "Redirect to https" stopProcessing = "true">
       <match url = "(. *)" />
       <Conditions>
       <add input = "{HTTPS}" pattern = "off" ignoreCase = "true" />
       </ Conditions>
       <action type = "Redirect" url = "https: // {HTTP_HOST} {REQUEST_URI}"
        redirectType = "SeeOther" />
     </ Rule>
   </ Rules>
</ Rewrite>


Now the site will switch to https.

Note! For this to work, you must have an SSL installed on your domain!

Was this answer helpful?

« Back

Powered by WHMCompleteSolution