Host headers for Smartsite iXperion 1.2 and beyond

Release 1.2 - ...

Starting with Smartsite iXperion 1.2, host headers are configured in the Smartsite.config file. A host header is defined in a channel or in a special channel with code="*". Host headers defined in the channel with code="*" are called global host headers.

XML CopyCode image Copy Code
<channels default="def" mergedatabasehostheaders="false">
    <channel code="*">
        <hostheaders>
            <hostheader baseurl="http://localhost" default="true" />
            <hostheader baseurl="http://127.0.0.1" />
        </hostheaders>
    </channel>
    <channel code="def">
        <hostheaders>
            <hostheader baseurl="www.mysite.com" default="true" />
        </hostheaders>
    </channel>
    <channel code="nl">
        <hostheaders useglobalhostheaders="false">
            <hostheader baseurl="www.mysite.nl" default="true" />
            <hostheader baseurl="www.mysite.be" browsestartpage="188" />
        </hostheaders>
    </channel>
    <channel code="fr">
        <hostheaders useglobalhostheaders="false">
            <hostheader baseurl="www.mysite.fr" default="true" />
        </hostheaders>
    </channel>
    <channel code="aim" type="Smartsite.Publication.AIMChannel,Smartsite.Publication" />
    <channel code="arc" type="Smartsite.Publication.AIMChannel,Smartsite.Publication" />
    <channel code="raw" type="Smartsite.Publication.RawChannel,Smartsite.Publication" />
</channels>

In this example there are two global host headers defined (http://localhost and http://127.0.0.1) which makes all channels accessible on these urls, except when a channel has the attribute 'useglobalhostheaders' set to 'false'. In this example all channels except NL an FR are available on these two urls. The NL channel is accessible on http://www.mysite.nl and http://www.mysite.be where the first one is the default and the second one has a different browse start page.

Every channel must have a default host header so it is recommended that you mark one global host header as the default host header such that every channel has a default host header. You may switch the default host header for specific channels to other base urls.

If no browse start page has been defined for a host header, the browse start page of the channel is used.  Host headers can be disabled for a specific channel by adding the host header to that channel and setting the attribute 'enabled' to 'false'.

 

Merging with database host headers

For backwards compatibility with versions before 1.2, Smartsite can merge the host headers defined in the Smartsite.config file with the host headers in the database. If you want to use the host headers defined in the database, you must set the attribute 'mergedatabasehostheaders' to 'true'. The host headers that are valid for a channel are determined by the following source in this particular order:

  • Global host headers defined in the database item of the default channel.
  • Global host headers defined in the Smartsite.config file.
  • Host headers defined int the database item of the channel
  • Host headers defined in the Smartsite.config file

Host headers defined at a level overrule the host header defined at a previous level.