Skip to main content

LevelBlue Named Official Cybersecurity Advisor of the PGA of America. Learn more

LevelBlue Named Official Cybersecurity Advisor of the PGA of America. Learn more

Services
Cyber Advisory
Managed Cloud Security
Data Security
Managed Detection & Response
Email Security
Managed Network Infrastructure Security
Exposure Management
Security Operations Platforms
Incident Readiness & Response
SpiderLabs Threat Intelligence
Solutions
BY TOPIC
Offensive Security
Solutions to maximize your security ROI
Operational Technology
End-to-end OT security
Microsoft
Unlock the full power of Microsoft Security
Securing the IoT Landscape
Test, monitor and secure network objects
Why LevelBlue
About Us
Awards and Accolades
LevelBlue SpiderLabs
PGA of America Partnership
Secure What's Next
LevelBlue Security Operations Platforms
Security Colony
Partners
Microsoft
Unlock the full power of Microsoft Security
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
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
.