Host Headers Option?

May 19, 2011 at 12:13 PM

Hi,

I don't see an option in the XML to specify the host header for the web applications. Has anyone had any experience with this?

Thanks

May 20, 2011 at 12:21 AM

 In the CreateWebApp function the host Header defaults to the url without "http://" (or https://). See below for snippet of code

So , if your url is http://myportal.mycompany.com then the host header will be myportal.mycompany.com

.....

If ($url -like "https://*") {$UseSSL = $true; $HostHeader = $url -replace "https://",""}       
    Else {$HostHeader = $url -replace "http://",""}

....

Coordinator
May 20, 2011 at 3:10 AM

Thanks @bes12, that's indeed correct and exactly what I was going to reply.

Cheers
Brian

May 20, 2011 at 7:58 AM

great, thank you both!