IIS Rewrite Input Types

2019-06-16 09:03发布

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

2条回答
贪生不怕死
2楼-- · 2019-06-16 09:13

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

查看更多
该账号已被封号
3楼-- · 2019-06-16 09:24

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
查看更多
登录 后发表回答