I am trying to implement URL redirect for the website rather than doing it page by page. I want to do it in the global.asax file. Below is the code i have defined.
I
If using IIS 7 or higher, the simplest solution is to use the httpRedirect element in your web.config.
This method is very powerful, for example if you have changed the domain but the pages are the same, you have just to add:
I wrote a small article here: ASP.NET 301 permanent redirects: the best solution