URL Rewrites in Umbraco
When to use the URL Rewriting Middleware
Using the URL Rewriting Middleware
Example
<?xml version="1.0" encoding="utf-8" ?>
<rewrite>
<rules>
<rule name="Redirect umbraco.io to preferred domain" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="\.umbraco\.io$" />
<add input="{REQUEST_URI}" pattern="^/App_Plugins/" negate="true" />
<add input="{REQUEST_URI}" pattern="^/umbraco" negate="true" />
</conditions>
<action type="Redirect" url="https://example.com/{R:0}" />
</rule>
</rules>
</rewrite>Rewrite rule shortcuts
Examples of rewrite rules
External Resources
Example: Remove a Trailing Slash
Example: Enforce HTTPS
Example: Redirect Non-www to www
Example: Remove the .aspx Extension
Example: Custom Rewrite Rules for Umbraco Cloud
Example: Serving Files from the .well-known Path
.well-known Path
Last updated
Was this helpful?