I am attempting to create a Site Collection that appears as a managed path. Here is the scenario:
I have a company that is in many regions and I have a toplevel portal for them - finance. the HNSC is finance.companyname.com. I would like to create another HNSC to break the company finance down to geographic locations, and then regions - finance.companyname.com/ca and further to finance.companyname.com/ca/cityname.
I have created the following powershell script to create a site collection with it's own content database as follows (the /ca was added for this particular requirement):
New-SPSite 'http://finance.companyname.com/ca' -OwnerAlias 'domain\FarmAccount' -HostHeaderWebApplication 'http://companyportal.company.com' -Name 'Company Finance Canada' -Description 'Company Canadian Finance Departments Portal Site' -ContentDatabase (Get-SPContentDatabase SiteCollection_ContentDB) -language 1033 -Template 'STS#0'
The result is that I receive the error "site collection could not be created as the provided hostheader managed path does not exist. Change the url to use an existing hostheader managed path or create the missing hostheader managed path prior to calling this command."
The reason for all of this is to have each site collection regionally identified and using its own content database. I am trying to stay in the arena of HNSC's and prefer to not have to use managed paths, but need the effect of such, if possible.
This is what I need to achieve:
finance.companyname.com - portal with separate contentDB (done)
finance.companyname.com/ca - Canadian portal with own contentDB
finance.companyname.com/ca/cityname - regional site collection with own contentDB
Any help is greatly appreciated.