SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a root site collection with following url:

I want to auto redirect all users who browse to the root site collection to another site collection with this url:

so that nobody can use root site collection. What can be the best solution.

Thanks for advices.

share|improve this question

Add content editor webpart on your root site collection , and put below javascript in that webpart

<script type="text/javascript">
 window.location = ""
share|improve this answer
Thank you, I tested your answer. It is right but for a short time users see the root site collection. I would like to redirect the users before they come to the first page of the root site collection. right now I am trying to write a http module but the disadvanteges of http module is they must be registered by editing web.config file. I tested URL-Rewrite which is created by this guy, but no success yet.… – Medes Oct 22 '12 at 10:09
for rewriting the url plese refer:… – Anuja Oct 22 '12 at 10:17
for writing a http module, this should help you :… – Anuja Oct 22 '12 at 10:20

Your Answer


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.