Knowledgebase
How to Redirect Visitors to the Secure URL - WSP
Posted by KB Editor on 04 May 2017 12:34 PM

This article assumes that you have already ordered an SSL Certificate.  Redirecting your visitor to the secure URL will ensure that the data exchanged between your visitor and the website is secure.  In addition, redirecting your website without an SSL certificate will generate browser errors when a visitor attempts to visit your website.

To automatically redirect visitors to the Secure URL:

  1. Log into your WebsitePanel Hosting Space
  2. Click File Manager under Hosting Spaces

  3. Click the domain you want to modify in the File Manager

  4. Click on the root document folder wwwroot

  5. Locate the web.config file and click on the edit icon
  6. Add the following code after the <system.webServer> code:
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
  <match url="(.*)" />
    <conditions>
      <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    </conditions>
  <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>

Please note that the rewrite is provided as is with no warranties.  If you need a customized rewrite, you will need to contact a developer as rewrites are outside the scope of our support.



Attachments 
 
 001.png (34.79 KB)
 002.png (4.55 KB)
 003.png (3.84 KB)
 004.png (6.14 KB)
(6 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).