Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

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, 12:00 PM


Overview

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

Procedure

Single Web Server

This procedure will work with a single web server (i.e., no load balancer).

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
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


Multiple Web Servers Behind a Load Balancer

TODO

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