16

What are the input types you can use in IIS rewrite rules? The ones I mean are like as follows:

<conditions>
    <add input="{HTTP_HOST}" type=”Pattern” pattern="^www\.mysite\.com$" negate="true"> 
</conditions>
  • HTTP_HOST
  • URL
  • REQUEST_FILENAME
  • ?
abatishchev
  • 98,240
  • 88
  • 296
  • 433
McGarnagle
  • 101,349
  • 31
  • 229
  • 260

2 Answers2

23

You can try the below input types. See also reference docs for the URL Rewrite module.

  • CACHE_URL
  • DOCUMENT_ROOT
  • HTTP_URL
  • HTTP_HOST
  • PATH_INFO
  • PATH_TRANSLATED
  • QUERY_STRING
  • REQUEST_FILENAME
  • REQUEST_URI
  • SCRIPT_FILENAME
  • SCRIPT_NAME
  • SCRIPT_TRANSLATED
  • UNENCODED_URL
  • URL
  • URL_PATH_INFO
  • APP_POOL_ID
  • APPL_MD_PATH
  • APPL_PHYSICAL_PATH
  • GATEWAY_INTERFACE
  • SERVER_SOFTWARE
  • SSI_EXEC_DISABLED
  • SERVER_NAME
gab71
  • 3
  • 1
Deepu Madhusoodanan
  • 1,495
  • 1
  • 14
  • 26
20

You can also use IIS (7 and above I believe):

Open IIS => Navigate to your website => Double-click URL Rewrite => Edit a rule => Add or Edit a condition => When you start typing '{' in the 'Condition input' field, a list of types will appear.

Editing an inbound rule

Moo
  • 849
  • 7
  • 16