Commits

Dan Carroll committed 99a2c74

Add Web.config to do URL rewrite

  • Participants
  • Parent commits ef436c9

Comments (0)

Files changed (1)

content/Web.config

+<?xml version="1.0"?>
+
+<configuration>
+    <system.webServer>
+        <rewrite>
+            <rules>
+                <rule name="Canonical Hostname">
+                    <match url="(.*)" />
+                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
+                        <add input="{HTTP_HOST}" pattern="^dancarroll\.org$" negate="true" />
+                    </conditions>
+                    <action type="Redirect" url="http://dancarroll.org/{R:1}" redirectType="Permanent" />
+                </rule>
+                <rule name="Convert to lower case" stopProcessing="true">  
+                    <match url=".*[A-Z].*" ignoreCase="false" />  
+                    <action type="Redirect" url="{ToLower:{R:0}}" redirectType="Permanent" />  
+                </rule>
+            </rules>
+        </rewrite>
+    </system.webServer>
+</configuration>
+