The General configuration tab is the SCA default tab (Figure 18-3). It allows configuration of settings that affect how CMS URLs are formed. Basically, this tab sets up how users can browse the CMS Web site.
The URL Format setting allows us to configure how site resources are accessed via a URL in presentation mode. The options are Hierarchical and Unique ID Based.
Hierarchical URLs follow the CMS channel hierarchy; the channel names present the user with a logical way to browse the site. This setting is the recommended option. The URL looks similar to the URLs formed following a virtual directory structure in non-CMS Web sites. For example, http://www.botsconsulting.com/botsconsulting/about/history points to the /botsconsulting/about/history channel.
When channel names are used in URLs, the special characters in the names are replaced by URL-encoded characters. For example, if you have a channel called About Us, it will appear in a URL as About+Us that is, http://<site name>/About+Us. The space character in the channel name is URL-encoded and becomes a + character. URLs with many URL-encoded special characters can be confusing for users. To prevent this, follow the channel naming conventions outlined in the sidebar in Chapter 9.
Unique ID Based URLs generate numerical URLs to identify pages and channels. These URLs are based on the Globally Unique Identifiers (GUIDs) that are stored in the Content Repository for each CMS object, such as pages and channels. For example, the URL for the /botsconsulting/about/history channel would look similar to http://www.botsconsulting.com/NR/exeres/30895FCA-6899-46FD-94E5-241CB1BC6888.htm.
To change the URL type, click Configure on the General tab (you may need to scroll down in the browser window for this button to be displayed); in the General Configuration window (Figure 18-4), from the URL Format drop-down list, select Hierarchical or Unique ID Based, and click OK. You may need to restart IIS after making this change.
Figure 18-4. General Configuration window
Using Host Headers Mapping
The Map Channel Names to Host Header Names setting provides the ability to automatically map top-level channels as the root channels for a URL with a host header name that is identical to the channel name. It is a useful feature that allows us to host several CMS Web sites, with different domain names, on the same CMS server. These sites share the same CMS database.
The cohosting of CMS sites is transparent to users. From the user point of view, they are accessing a separate site, not a shared infrastructure.
Host headers mapping only affects URL generation and parsing in presentation mode. The available settings are Yes or No; the default setting is No. To change the host headers mapping, click Configure on the General tab; in the General Configuration window (Figure 18-4), from the Map Channel Names to Host Header Names drop-down list, select the appropriate option and click OK.
The CMS host headers mapping functionality is implemented as an ISAPI filter that matches the host header of an incoming HTTP request to the top-level channel names. The HTTP host header is the DNS name of a site; a top-level channel must have the same name. If the HTTP host header of the incoming request exactly matches the name of a top-level channel, CMS maps the request to the channel. When this option is enabled, every channel in the root channel becomes a virtual CMS Web site. For example, a top-level channel may be called www.CMSsite1.com (Figure 18-5). When the HTTP request for www.CMSsite1.com comes to the server, the site name in the HTTP host header is mapped to the top-level channel with the same name for example, www.CMSsite1.com.
Figure 18-5. Channels hierarchy with host headers mapping enabled
NOTE: Refer to Appendix A for reference information on HTTP host headers.
When CMS generates a URL pointing to an item inside the virtual site www.CMSsite1.com, it prefixes the URL with the name of the channel in which it is contained. For example, the URL pointing to the /products channel within the www.CMSsite1.com channel would be http://www.CMSsite1.com/products.
A CMS virtual site name must be a valid DNS name. The DNS name should point to an IP address of the IIS server. Multiple virtual CMS site names may point to the same IP address or may use different IP addresses that are assigned to the same IIS server.
It is worth stressing that you don't have to configure HTTP host headers on the IIS server to use the CMS host headers mapping functionality. These options are not hardwired together. In IIS, HTTP host headers are used to provide multihosting. The HTTP host headers identify multiple virtual Web sites that reside on one physical server. In this case, all sites share the same IP address. However, you can also provide IIS multihosting by assigning a unique IP address to each virtual Web site without configuring HTTP host headers. In both cases you can enable CMS host headers mapping.
However, you need to configure the HTTP host headers on the IIS site if a single IP address is used for multiple CMS sites. You don't have to set up separate virtual sites under IIS. Instead, you may use a single IIS site with multiple HTTP host headers configured. If you prefer, you can use multiple IIS sites with a single host header configured for each, or any combination of these methods. Each IIS site must be set up as a CMS Web entry point; it is CMS that does the mapping.
NOTE: We will look into CMS Web entry points later in this chapter.
For example, let's consider the hosting of five CMS sites on an IIS server with a single IP address. Each site has its own DNS name, as follows: www.CMSsite1.com, www.CMSsite2.com, www.CMSsite3.com, www.CMSsite4.com, and wwwCMSsite5.com. Figure 18-5 illustrates the top-level channels structure in the Site Manager for a CMS server that is configured for host headers mapping. There are five top-level channels that are the root channels for virtual CMS sites, with the same names as their corresponding sites. Each of the five DNS names may be mapped as a host header name to a separate IIS site (Figure 18-6), or all five DNS names for the virtual sites may be mapped as host header names to a single IIS site using the IIS snap-in (Figure 18-7). In any case, a Web request for the URLs that refer to these sites will be mapped to the appropriate channel.
Figure 18-6. IIS site with HTTP host headers enabled
Figure 18-7. Multiple HTTP host headers configured on a single IIS Web site
When you decide whether to use one IIS site or multiple IIS sites with host headers mapping, you need to take into consideration how your CMS sites will run in these different configurations. If you use a single IIS site with multiple host headers, then all CMS virtual sites will run within one Web application. If you use multiple IIS sites, each with a host header enabled, then each CMS virtual site will run as an independent Web application.
However, if you need to apply different settings to multiple CMS sites, then you need to consider setting up multiple IIS virtual sites. For example, you may need to protect one site with SSL, but not the others. In this case, you don't use HTTP host headers to identify the IIS site, but you would need to identify the site with a unique IP address. Another example is having one read-only site on an IP address on the external interface and a read/write site on an internal interface for security reasons. Once again, the sites will be identified by IP addresses; you don't need to configure HTTP host headers on the IIS.
When CMS host headers mapping is enabled, you must make sure that every channel directly under the root channel is a virtual Web site. You cannot have a mixture of virtual Web site and normal channels on the same CMS server using the same database. The setting is applicable to all sites sharing the CMS database.
CMS host headers mapping can be used for a single CMS site. When you create your new CMS site as a Web application in the root of a virtual IIS site, you expect to be able to access the default page of the top-level channel by the root URL that contains only the DNS name of the IIS site, such as http://<CMS site>. However, for this to happen, you need to enable CMS host headers mapping on your site. Refer to Chapter 8 for step-by-step configuration instructions for accessing your site by the root URL.
Another common requirement is to map multiple DNS names to a single site. For example, you may want the incoming requests for both www.CMSsite.com and CMSsite.com to come to the same CMS site, www.CMSsite.com. In this case, the HTTP host headers in the incoming request will be different depending on the DNS name used. However, it is possible to map different DNS names to a single top-level channel so that different users can reference the same channel, www.CMSsite.com, by using different site names. This functionality can be achieved in several ways for example:
The last setting shown on the General tab is the Server ASP Compatibility Mode. The available values are Mixed and ASP.NET Only. Mixed mode means that the CMS server supports both ASP and ASP.NET sites; CMS server in ASP.NET Only mode supports only ASP.NET sites. The server compatibility mode is selected during the CMS installation and cannot be changed after the installation.