This article applies to:
- Trustwave SEG SQM and Web Console
- SPE Administration and Customer Console
Question:
- I want all connections to be over HTTPS. How can I redirect HTTP requests to HTTPS?
Procedure:
You can use the Microsoft IIS URL Rewrite 2.0 extension to redirect HTTP connections to HTTPS.
- Ensure that the site is accessible by both HTTP and HTTPS.
- Download and install the extension from http://www.iis.net/downloads/microsoft/url-rewrite.
- Create a rewrite rule for your site with values similar to the following image.
- Note that "ignore case" is unchecked for both the Match URL and the Conditions.
Notes:
If you prefer to add the rule manually, the information shown above translates to the following lines at the end of the system.webserver section of web.config:
<rewrite>
<rules>
<rule name="HTTPS redirect" stopProcessing="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="false" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
</rule>
</rules>
</rewrite>