0

I am creating a site collection by calling a built-in SharePoint web service.

http://Server_Name/_vti_adm/admin.asmx

This web service has a method called CreateSite which allows users to create a site collection. Pretty straight forward (method documentation).

It creates a site with a URL such as:

http://Server_Name/sites/SiteCollection_Name

I would like to create a site collection where the Name of the Site comes first, such as:

http://SiteCollection_Name/Server_Name

I remember there is a property called UseHostHeaderAsSiteName

I can't see an option to use this property with CreateSite method. How do we use this property or any method to create a site that will give the URL such as:

http://SiteCollection_Name/Server_Name
skeletank
  • 2,880
  • 5
  • 43
  • 75
theITvideos
  • 1,462
  • 2
  • 18
  • 29

1 Answers1

0

What you describe - http://SiteCollection_Name/Server_Name - is not possible by the SP API. The URL format is protocol://server:port/path. The site collection can occur only in the path.

If you need different hostnames - the server part - you'd have to register them in the DNS mapped to your SP server IP address and then set up alternative access URLs in your SP web application so that they are accepted by SP. (SP is picky if you do not use the same hostname in the URL which it was installed with...)

Ferdinand Prantl
  • 5,281
  • 34
  • 35