In my previous post on Creating Site collections at the root of your Web Application, we did this with the knowledge that you would not be hosting a site at the root (http://extranet.company.com), this provided us with the ability to have clean site addresses with out the breakout need of a managed path like, /sites/ or /personal/ or even /dept/.
But what if we did need to have a site at the root and at “/”. What now?
Well this is where being a SharePoint admin keeps you employed.. lol
- In the previous post we removed the “Explicit inclusion” from our managed path. This is what breaks the ROOT site collection as SharePoint won’t serve up the root site collection with it set as a “Wildcard inclusion”, but it will server up anything underneath it. This means we have to go back to our managed paths and delete the “Wildcard inclusion” off of the root and change it back to an “Explicit inclusion”.
- Remove the “Wildcard inclusion” “/”.
- Add the “Explicit inclusion” for “/” back.
- Now what do we do? This is where the management becomes more of a concern. We need to identify what new managed paths are that need to be defined for each of our our new site collection.
- Go create a managed path for the new site collection with an “Explicit inclusion”. Example I named mine mikerules and miketest2.
- Now lets create the new Site Collection.
- Go to Application Management
- Select Create Site Collection under the Site Collection Section
- From the Drop down select the correct Web Application
- Provide it a name
- Under Web Site Address select the Drop Down and you will now be able to select “/”.
- Put in the Name of your new site collection.
- Pick your Template
- Select Ok
- Complete.
- Now you can create sites under the root.
- If we test both the root and new site collection, we will find that they both now work.
Now lets use PowerShell to create the new “Explicit inclusion” Managed paths that we are looking to add
- Open PowerShell (SharePoint 2010 Management Shell).
- The PowerShell command to create a Managed Path: (Always run as Administrator)
- New-SPManagedPath
- Our New Managed Path “MikeRules”.
- New-SPManagedPath MikeRules –WebApplication https://portal.companyname.com/ –Explicit
- the – Explicit is what’s necessary to create a site on the root and have it render.
- Look at you managed paths and you will see your new “MikeRules” Explicit inclusion managed path.
This method will now allow you to have Both the Root the Site Collection Managed path rendering at the same time. Remember that you now have to manage how and who can create these site collections and you need to know what name they will be each time.
Hope this helps.

0 comments:
Post a Comment