Skip to content

Instantly share code, notes, and snippets.

@jdavisclark
Created February 10, 2014 16:00
Show Gist options
  • Select an option

  • Save jdavisclark/8918442 to your computer and use it in GitHub Desktop.

Select an option

Save jdavisclark/8918442 to your computer and use it in GitHub Desktop.
iis rewrite rule: rewrite portions of the authority/domain-name to the path
<rewrite>
<rules>
<rule name="thing" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="(.*?)\.(.*?)\..*" />
</conditions>
<action type="Redirect" url="https://www.google.com?sub={C:1}&amp;asdf={C:2}&amp;path={R:0}" />
</rule>
</rules>
</rewrite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment