0

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.

1 Answer 1

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>
3
  • 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, 2012 at 10:09
  • for rewriting the url plese refer: sharepoint.stackexchange.com/questions/12702/…
    – Anuja
    Oct 22, 2012 at 10:17
  • for writing a http module, this should help you : thedotnotcorner.com/2012/06/07/…
    – Anuja
    Oct 22, 2012 at 10:20

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.