Reputation: 1501
We have WAWS setup with a custom domain and staging. When I try get the server variable HTTP_HOST it always returns sitename-azurewebsites.net. Is there another server variable that contains the custom domain? Also when on staging I would like it to return sitename-staging.azurewebsites.net instead of the custom domain. Is this possible?
Thanks
Upvotes: 1
Views: 616
Reputation: 7402
HTTP_HOST
will be whatever the client (browser usually) used to hit the site. If you hit your site with sitename.azurewebsites.net then the HTTP_HOST
will be that, if you hit it from the custom hostname it will be the custom host name. Same thing for the staging slot. If you never setup a custom hostname for the staging slot, then it will always be sitename-staging.azurewebsites.net
Upvotes: 1