Host headers for Smartsite iXperion 1.0 - 1.1

Release 1.0 - Release 1.1

Host headers are defined in the HostHeaders field of the channels. There are two different definitions:

  1. Global host headers can only be defined in the HostHeaders field of the default channel (as defined in the Smartsite.config file). Global host headers apply by default to every channel. When you do not want to use the global host headers for a specific channel, you can set the option useglobalhostheaders to false on that specific channel. The server address defined in the Smartsite.config file is automatically added to the list of global host headers.
  2. Normal host headers can be defined in the HostHeaders field of every channel. Normal host headers only apply to the channel in which they are defined.

When Smartsite needs to create a link to an item, it uses the host header that is marked as the default host header. If no host header is marked as the default, Smartsite will fall back on the default global host header. If there is no default global host header, the server address from the Smartsite.config file is assumed to be the default global host header.

Note that Smartsite uses these host headers to determine if an url points to an item that should be handled by Smartsite or not. Any url that is not included in these hostheader is assumed to be an external url so even urls like http://localhost and http://127.0.0.1 are assumed to be external unless otherwise specified.

Let's start with an example. Suppose you want to define the following mappings:

  • http://www.mysite.com points to every channel except to the french channel
  • http://nl.mysite.com points to the dutch channel
  • http://30april.nl.mysite.com points the a special item in the dutch channel
  • http://uk.mysite.com points to the english channel
  • http://en.mysite.com points to the english channel
  • http://fr.mysite.com points to the french channel

First, we'll define the host header in the default channel. The global host header is available to every channel.

XML CopyCode image Copy Code
<hostheaders>
  <globalhostheader baseurl="http://www.mysite.com" default="true" />
</hostheader>

In the dutch channel we want to add two host headers, one that is the default for items in the dutch channel and one that points to a special regarding the Dutch National Day.

XML CopyCode image Copy Code
<hostheaders>
  <hostheader baseurl="http://nl.mysite.com" default="true" />
  <hostheader baseurl="http://30april.nl.mysite.com" browsestartpage="12345" />
</hostheaders>

In the English channel we want to add two host headers of which the first one is the default.

XML CopyCode image Copy Code
<hostheaders>
  <hostheader baseurl="http://uk.mysite.com" default="true" />
  <hostheader baseurl="http://en.musite.com" />
</hostheaders>

Finally, we want to add a host header for the French channel but we don't want the French channel to be accesible through the global host header http://www.mysite.com. We do that by setting the useglobalhostheaders to false.

XML CopyCode image Copy Code
<hostheaders useglobalhostheaders="false">
  <hostheader baseurl="http://fr.mysite.com" default="true" />
</hostheaders>