Wednesday, May 6, 2015

ASP.NET Tips: Redirecting all uppercase letter in URL into lowercase URL

For the purpose of SEO, sometimes we need a way to enforce all URL into lowercase. In order to do that in an ASP.NET project, we can add a URL rewrite rules in the web config file inside the system.webserver tag.

Here is the configuration of URL rewrite looks like:

          <rule name="LowerCaseRuleRedirection" stopProcessing="true">
               <match url="[A-Z]" ignoreCase="false"/>
                <action type="Redirect" url="{ToLower:{URL}}" />

Please leave a comment if you find my post useful. Happy coding programmers! :)

Text Editor Tips: Some Useful Brackets Extension

Brackets  is an open source and free-to-use text editor and primarily being used by web developers and designer. I mainly use Brackets for d...