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

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>
  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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