Skip to content

Instantly share code, notes, and snippets.

@hartviglarsen
Created July 19, 2018 13:50
Show Gist options
  • Select an option

  • Save hartviglarsen/fe1537fc87edde8ae8a3c470190d55df to your computer and use it in GitHub Desktop.

Select an option

Save hartviglarsen/fe1537fc87edde8ae8a3c470190d55df to your computer and use it in GitHub Desktop.
Web.live.xdt.config
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect umbraco.io to google.com" stopProcessing="true" xdt:Transform="Insert">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(.*)?.s1.umbraco.io$" />
<add input="{REQUEST_URI}" negate="true" pattern="^/umbraco" />
<add input="{REQUEST_URI}" negate="true" pattern="^/DependencyHandler.axd" />
<add input="{REQUEST_URI}" negate="true" pattern="^/App_Plugins" />
</conditions>
<action type="Redirect" url="https://google.com/{R:0}" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment