Jasinski Technical Wiki


Home Page
All Pages

Quick Search
Advanced Search »

Contributor Links

Create a new Page
File Management
Your Profile

Other Wiki Sections



Page History: Forcing SSL with a URL Rewrite Rule - IIS7

Compare Page Revisions

« Older Revision - Back to Page History - Newer Revision »

Page Revision: Wed, Jul 02, 2014, 10:57 AM


Frequently when you have a site that uses SSL, you want to force the use of SSL on all pages. Thus, when a user navigates to an http:// . . . address on the site, you would like them redirected to the equivalent https:// . . . address. This article describes how to do this within Internet Information Services 7


1. Within IIS7 Manager, navigate to the site of interest > IIS group > URL Rewrite icon

2. Create a rule with the following settings

Match URL
Requested URL = Matches the Pattern
Using = Regular Expressions
Pattern = (.*)
Ignore case = unselected

Conditions (only one condition)
Logical grouping = Match All
Input = HTTPS
Type = Matches the Pattern
Pattern = off
Track capture groups across conditions = unselected

Action type = Redirect
Redirect URL = https://{HTTP_HOST}/{R:1}
Append query string = selected
Redirect type = Permanent (301)

SSL Redirect Rule Settings

SSL Redirect Rule Settings

ScrewTurn Wiki version Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2020, Patrick Jasinski.