We have moved some sub-sites from a Content DB of 140GB to a new SC in sharepoint 2010. Now, both the sites are up and running and we want to redirect the old URL to new URL so that we delete the old site. We want if someone enters http://servername/sites/SC/sitename so it should redirect to http://servername/sites/SC1/sitename

2 Answers 2


The way I have done this before was to create a database table with the mappings of the urls. The first column holds the old url and the second column holds the new url. Then I wrote a httpmodule that checks each request on beginrequest to see if the url matches a value in column 1, if so redirect to the url in column 2. I installed it to the old farm. It works pretty well but I would recommend plenty of testing and some caching to not reduce performance. An improperly coded httpmodule can really screw up your environment's performance and functionality.

Another way I've done this was just to create a redirect webpart. Then I put the webpart on the homepage of the old site. This doesn't handle as many cases as httpmodule but it is a safer solution.

  • Thanks for your response. I have also tried this with web part but the issue is it only works for the home page what if someone has a direct URl for a Library/list. Moreover i would not be able to write anything as I am a Zero coder. :)
    – shiv yadav
    May 9, 2012 at 8:15
  • I have used a HTTP Module before to redirect subsites on the fly, but you are right with the need to test, as it runs on every single HTTP request to the site. May 10, 2012 at 12:58

Try using your web server or load balancer to perform the redirections. If you are running IIS7 or higher, take a look at the URL Rewrite module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.