Search code examples
sharepointiissharepoint-2010alternate-access-mappings

How to redirect root web site to site collection


I'm having quite a hard time figuring out this problem and I need your help. Here's the scenario:

I have a sharepoint 2010 web application on my port 80. This has 2 site collections, the root, and the /sites/official. My problem is: The root site is empty, but in the future it will be my something (I don't know what yet), but my other site collection is ready to go and I already have an Internet address for it.

What I want to do is configure everything in way that I can type http://contoso.com and get as response my sub-site (yes, its a kind of redirect)...

how can I do it? What and where should I configure it?


Solution

  • add content editor webpart on your root site collection and put this javascript in that webpart

    <script type="text/javascript">
    window.location = "http://contoso.com/sites/official"
    </script>