Skip to main content

Join us at Gartner SEC London and discover how LevelBlue can help you secure what’s next. Learn More

Loading...
Loading...

HOWTO: Automatic Redirect to HTTPS for web applications

Expand / Collapse


This article applies to:

  • MailMarshal 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.

  1. Ensure that the site is accessible by both HTTP and HTTPS.
  2. Download and install the extension from http://www.iis.net/downloads/microsoft/url-rewrite.
  3. Create a rewrite rule for your site with values similar to the following image.
  4. 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>

To contact LevelBlue about this article or to request support:


Rate this Article:
     

Add Your Comments


Comment submission is disabled for anonymous users.
Please send feedback to Trustwave Technical Support or the Webmaster
.