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

I have created a root site collection with following url:

 http://sp.domain.com

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

  http://sp.domain.com/sites/firstSite

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

Thanks for advices.

share|improve this question

1 Answer 1

Add content editor webpart on your root site collection , http://sp.domain.com and put below javascript in that webpart

<script type="text/javascript">
 window.location = "http://sp.domain.com/sites/firstSite"
</script>
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. blog.mastykarz.nl/… –  Medes Oct 22 '12 at 10:09
    
for rewriting the url plese refer: sharepoint.stackexchange.com/questions/12702/… –  Anuja Oct 22 '12 at 10:17
    
for writing a http module, this should help you : thedotnotcorner.com/2012/06/07/… –  Anuja Oct 22 '12 at 10:20

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.