Return to Snippet

Revision: 40614
at April 8, 2011 03:01 by batfan


Updated Code
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
     <modules runAllManagedModulesForAllRequests="true" />
        <rewrite>
            <rules>
                <rule name="CanonicalHostNameRule1" stopProcessing="true">
                  <match url="^(\w*/)?default\.aspx" />
		    <conditions>
			<add input="{HTTP_HOST}" pattern="domain\.com$" />
		    </conditions>
                   <action type="Redirect" url="http://www.domain.com/{R:1}" />
                </rule>
                <rule name="CanonicalHostNameRule2" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^domain\.com$" />
                    </conditions>
                    <action type="Redirect" url="http://www.domain.com/{R:1}" />
                </rule>
            </rules>
        </rewrite>
  </system.webServer>
</configuration>

Revision: 40613
at February 4, 2011 08:47 by batfan


Initial Code
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
     <modules runAllManagedModulesForAllRequests="true" />
        <rewrite>
            <rules>
                <rule name="CanonicalHostNameRule1" stopProcessing="true">
                    <match url="index\.html(?:l)?" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="domain\.com$" />
                        </conditions>
                        <action type="Redirect" url="http://www.domain.com/" />
                </rule>
                <rule name="CanonicalHostNameRule2" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^domain\.com$" />
                    </conditions>
                    <action type="Redirect" url="http://www.domain.com/{R:1}" />
                </rule>
            </rules>
        </rewrite>
  </system.webServer>
</configuration>

Initial URL

                                

Initial Description

                                

Initial Title
web.config Default

Initial Tags

                                

Initial Language
ASP