WORKING WITH HOSTNAMES

Two steps are necessary in setting up multiple hostnames within one Umbraco installation. You must instruct the Web server to listen to the required hostnames, and then you must tell Umbraco where to redirect the request. IIS (Internet Information Services) is the Web server that Umbraco uses because it is based on .NET.

To set up your IIS website to bind to one or more hostnames, follow these instructions:

  1. Open your IIS server console by searching for Internet Information in your Start menu search box, as shown in Figure 7-5.
  2. Navigate to the website that you want to change by expanding the {Your Computer Name} and Sites nodes in the left-hand pane, as shown in Figure 7-6.
  3. Locate the website to change and right-click to open the context menu, and then click the Edit Bindings menu item.
  4. In the resulting dialog, click the Add button. The Add Site Binding dialog appears.
  5. Enter the hostname that you want to add; in this case umbracousersguide.se.local, as shown in Figure 7-7. You can leave all other fields with their default values.
  6. Click the OK button in the Add Site Binding dialog.

    FIGURE 7-5

    image

  7. Click the Close button in the Site Bindings dialog.

    FIGURE 7-6

    image

    FIGURE 7-7

    image

image For local development and testing, you can use your Windows hosts file to set up pointers to the newly created hostnames so that they will resolve to the websites when you type them in to the browser. To do this, simply open your hosts file, located in C:WindowsSystem32driversetc, in a text editor like Notepad and add a tab-delimited entry with the IP address of your development computer and the hostname you selected in the preceding steps.

Now that IIS knows where to send the incoming requests, it's time to configure Umbraco to route those requests to the correct site as you set it up in the previous section:

  1. Right-click Runway Homepage (en) in the Content section.
  2. Click Manage Hostnames in the resulting context menu.
  3. In the Manage hostnames dialog, enter the domain that you want to use for the English version, umbracousersguide.com.local, and choose English (United States) in the Language drop-down list, as shown in Figure 7-8.
  4. Click the Add new domain button.
  5. Click the Close this window link that appears under the newly created domain, as shown in Figure 7-9.
  6. Repeat steps 2–5 on the Runway Homepage (se) node and select Swedish (Sweden) for the language there.

If you were to take a look at the Properties tab for either homepage node now, you will find a new item called Alternative Links. This reflects the domain that you added for each of the homepage nodes, which means that the two separate sites are now available on individual domains. To illustrate that this really works, change the Site Description to see the label change between the domains, as shown in Figure 7-10.

FIGURE 7-8

image

FIGURE 7-9

image

FIGURE 7-10

image

image Not only has the language changed for the two domains, but you will also notice that the culture changed so that dates, currencies, and other regionally specific values are now correct for the chosen language.

As you can see, you now have two separately accessible domains for which to serve up content in different languages. Each page needs to be translated individually and you can now assign editors and translators to each site. The next section provides an overview of the translation workflow that is built into Umbraco.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset