Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer
    
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 '12 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. –  Daniel Butler May 10 '12 at 12:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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