HTTP to HTTPS redirection with IIS7

On 17 November 2010, in IIS 7, by Himselff
  • Select the web site you want to modify
  • In the right section select the “URL REWRITE”

  • In the action menu section, select the “Add rule” options

  • Use the blank rule template

  • The following windows open

  • Enter a name for your rules
  • Expand the menu “Match URL”
  1. Select in the  “Requested URL” drop down, “Matches the Pattern”
  2. Select in the  “Using” drop down, “Regular Expression”
  3. Enter the folling pattern in the text box : “(.*)”
  4. Be sure that the “Ignore case” check box is checked

  • Select the “Condition” section
  • Click the “Add” button to create a new connection

  • Enter in the “Condition” text box : {HTTPS}
  • Select in the “Request URL” drop down : “Match the Pattern”
  • Enter in the “Pattern” text box : ^OFF$
  • Make sure that the “Ignore Case” check box is checked

  • Click the “OK” button to validate
  • Select the “Action” section
  • In the “Action Type” drop down, select “redirection”
  • In the text box “URL redirect” entrez : https://{HTTP_HOST}/{R:1}
  • Make sure that the check box “Append to query string” is checked
  • In the next drop down, select the “303” option

  • Click “Apply” in the upper right corner to save the new rules


Comments are closed.