Sitecore URL Rewrite and Redirect using IIS rewrite module

There are many Sitecore URL redirect modules for 301 redirections and URL Rewrite modules in Sitecore Marketplace which you need to install separately. This article demonstrates  Sitecore URL Rewrite and Redirect using IIS rewrite module which is traditional .NET approach.

Sitecore URL Rewrite and Redirect using IIS rewrite module

Follow the detailed steps to perform URL Rewrite and 301 redirects in Sitecore without writing any code.

#1. Install URL Rewrite 2.0 Module from the Microsoft. There are different versions for x64 and x86. Download and install it according to the OS and IIS installed.

#2. Once the installation is done, Go to IIS Manager and verify for the URL Rewrite icon. If the installation is success then you will see the URL rewrite icon in the IIS.

#3. Create a config file RewriteRules.config in the App_Config folder of Sitecore. Add all the Rewrite rules in this file.

#4. For Redirections, you could create a file called as RewriteMaps.config in the App_Config folder of Sitecore. Add all the static redirections and rewrite maps in this config file.

#5. Open the web.config in the root folder and add the below lines to make it work. Just add these lines above the closing tag of </system.webServer>

#6. Restart the IIS and the URL rewrite and redirects should work like a charm. You do not have to install any Modules, or write any code.

Sitecore URL Redirect and Rewrite Example:

RewriteRules.config

RewriteMaps.Config

Web.Config

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *