https://sp.site.com/bu/dept -> https://dept.site.com
-
08-10-2020 - |
题
I have a web application with a root site collection:
I have further host named site collections like this:
https://sp.site.com/bu/dept1
https://sp.site.com/bu/dept2
https://sp.site.com/bu/dept3
Note: "bu" is just a host header managed path.
Then I have sites under these site collections like so:
https://sp.site.com/bu/dept1/site1
https://sp.site.com/bu/dept1/site2
https://sp.site.com/bu/dept2/site1
https://sp.site.com/bu/dept3/site1
Is it possible to add/change a site's URL from https://sp.site.com/bu/dept1/site1 to https://site1.site.com?
If not, is it possible to add/change a site collection's URL from https://sp.site.com/bu/dept1 to https://dept1.site.com?
I have tried to use Set-SPSiteUrl
to add a URL for a site collection but I get an error message saying this can only be applied to the root site collection at https://sp.site.com.
Any other methods within or outside of SharePoint?
解决方案
Yesm You can only change the url of the root site collection of HNSC. Here is what technet is describing;
The Set-SPSiteUrl cmdlet only applies to the root site collection for a host name that is, http://www.contoso.com. This cmdlet cannot be directly run against a managed path site collection underneath the root that is, http://www.contoso.com/sites/test.
But if you want to change it, then I am thinking of backup and restore option. Create new HSNC site collection using the new url, then take the backup of existing and restore it on newly created.