• 4/7/2015
  • 1646 Views

Comments

1646 Views

HostHeader

Last updated 6 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
The HostHeader setting is one of the AppSettings that is contained in the web.config file.

The HostHeader setting is used by installs that want to remove a portion of every path. This is primarily used when a site when a site wants to escalate the level it is at, whilst preserving the hierarchy internally e.g. perhaps a site is deployed into a virtual directory called "johndoe", this means the final url will look similar to "www.mydomain.com/johndoe/Default.aspx".

Whilst the correct fix is to move the contents to the root folder and add a Portal Alias for www.mydomain.com, sometimes this is not possible e.g. perhaps another asp.net application is in the root folder, or perhaps the hosting provider does not support this. If this is the case then it sometimes this can be resolved by using this parameter.

Note: this parameter provides a very simple replacement of the set text on the URL - if the text is used elsewhere e.g. you have a page also called "johndoe" this will not work.

The HostHeader default looks similar to:

<add key="HostHeader" value="" />

Using the example of above we would set this to:

<add key="HostHeader" value="johndoe" />

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out