SEO (lower case URLs and Remove /)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
1. Install urlrewriter
from
http://www.microsoft.com/web/spotlight/urlrewriter/

2. Add default 2 rules LowerCaseRule and RemoveTrailingSlashRule

3. Manually add selected lines

                <rule name="LowerCaseRule1" stopProcessing="true">
                    <match url="[A-Z]" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
    <add input="{REQUEST_METHOD}" matchType="Pattern" pattern="POST" ignoreCase="true" negate="true" />
                    </conditions>
                    <action type="Redirect" url="{ToLower:{URL}}" />
                </rule>
                <rule name="RemoveTrailingSlashRule1" stopProcessing="true">
                    <match url="(.*)/$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
         <add input="{REQUEST_METHOD}" matchType="Pattern" pattern="POST" ignoreCase="true" negate="true" />
                    </conditions>
                    <action type="Redirect" url="{R:1}" />
                </rule>


By default. GET and POST url change to LowerCase.
and you can have a problem like this
https://www.nopcommerce.com/boards/t/17399/no-system-log-no-order-list-upgraded-from-24-to-25.aspx?p=2

or you can add this lines
                <rule name="LowerCaseRule1" stopProcessing="true">
                    <match url="[A-Z]" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
     <add input="{REQUEST_METHOD}" pattern="GET" />
                    </conditions>
                    <action type="Redirect" url="{ToLower:{URL}}" />
                </rule>
                <rule name="RemoveTrailingSlashRule1" stopProcessing="true">
                    <match url="(.*)/$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
         <add input="{REQUEST_METHOD}" pattern="GET" />
                    </conditions>
                    <action type="Redirect" url="{R:1}" />
                </rule>
10 years ago
Works perfectly. Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.