Avoiding the channel friendly name in your url.

Smartsite 7.2 - ...

In Smartsite 7.2 there are more scenario's in which you can drop the channel's friendly name from your url. By default the old behavior is applied to ensure your links will not change if you install Smartsite 7.2.

To drop the channel friendly name you must ensure that the following rules apply to your site configuration:

  1. The channel on which you want to drop the channel friendly name must run on an exclusive hostheader.
  2. You must enable this new feature in the friendly names configuration

Exclusive hostheader

To use an exclusive hostheader for your channel, edit the Smartsite.config file and create a configuration like below where the channel DEF has its own exclusive host header which is not shared by other channels.

XML CopyCode image Copy Code
<channel code="DEF">
   <hostheaders useglobalhostheaders="false">
      <hostheader baseurl="http://higgs" default="true"/>


Enable the 'HideChannelFriendlyName' feature

Edit the friendly name settings the in Smartsite.config file and add the HideChannelFriendlyName parameter and set it to true.

XML CopyCode image Copy Code
  <friendlynames enforce="true">
   <mapper id="DefaultFriendlyNameMapper" type="Smartsite.Core.DefaultFriendlyNameMapper, Smartsite.Runtime">
     <parameter name="UseVirtualRoot">true</parameter>
     <parameter name="UrlParameterEndpointExtension">mvc</parameter>
     <parameter name="HideChannelFriendlyName">true</parameter>