Creating a Web Site Rule document

You can keep database files, HTML files, CGI scripts, and other related Web files in multiple locations or move them to new locations without breaking URL links or changing documents. Redirecting a URL using a Web Site Rule document displays the page in the new location and displays the URL in the location box for the user. Mapping a URL or directory displays the page in the new location and hides that new location from the user.

About this task

The Web Site Rule document is created from within the corresponding Web Site document. The four types of Web Site Rule documents are:

  • Directory -- Use the Directory type to direct incoming URLs to a specific directory, and to assign an access level.
  • Redirection -- Use the Redirection type to specify that designated incoming URL patterns be redirected to a specified URL.
  • Substitution -- Use the Substitution type to replace a specified URL pattern with another specified URL pattern.
  • HTTP response header -- Use the HTTP response header type to specify HTTP headers that are added to all responses from requests that match the specified URL pattern.

Web Site rules allow you to relocate or reorganize sites without breaking existing links or browser bookmarks.

The Rules document displays as a response to the Web Site document on the Configuration tab in the Web > Internet Sites view.

Procedure

  1. From the IBM® Domino® Administrator, click the Configuration tab, expand the Web section and click Internet Sites.
  2. Choose the Web Site document you want to edit and click Edit Document.
  3. Click the Web Site button and choose Create Rule.
  4. Click the Basics tab and complete the following fields:
    Table 1. Basics tab fields

    Field

    Action

    Description

    Enter a name that differentiates this rule from others you create.

    Type of Rule

    Choose one:

    • Directory -- To allow a server file-system directory to be accessed by a URL path.
    • Redirection -- Resource identified by the URL has been moved to a different location or Web site.
    • Substitution -- To replace a string in the URL with another string.
    • HTTP response header -- To add an Expire header or custom headers to HTTP responses that match specified URL patterns and response codes.
    • Override session authentication -- To set up basic authentication for a specific Web site when session-based authentication is enabled for the server.

    Incoming URL pattern

    Pattern that describes the URLs affected by this rule.

    If you are defining many rules, specify the longest unique pattern for each rule. Do not include http or the host name in the pattern.

    Redirect to this URL

    (Redirection only) Enter the new URL location. If the URL pattern in this field starts with a slash, the rule is treated as internal redirection. Otherwise, the rule is assumed to be external redirection.

    The pattern for an external redirection needs to start with an Internet protocol string that the browser understands, such as http: or ftp.

    Send 301 Redirect

    (Redirection only) Available only when you have specified values for both Incoming URL pattern and Redirect to this URL. Domino normally sends a redirect http return code of 302, indicating that the redirect is only temporary. Selecting Yes in this check box instead sends a return code of 301, indicating that the redirect should be permanent, and causing the browser to remember the redirect URL.

    Replacement pattern

    (Substitution only) Enter the string that replaces the matching part of the incoming URL.

    Target server directory

    (Directory only) Enter the file-system directory path being mapped. This can be specified as a fully-qualified path or a path relative to the data directory. If you want to map a directory that isn't under the Domino data directory, specify the fully qualified path.

    Access level

    (Directory only) Choose one:

    • Read access -- To allow browser users to read files from the directory are displayed in the browser or downloaded. When a user requests a file from the directory, the server sends the contents of the file back to the browser.
    • Execute access -- To allow browser users to load and run CGI programs in the directory. The server relays the output from the program to the browser.

    HTTP response codes

    (HTTP Response Header only) Enter the HTTP response codes to which you want your response headers applied.

    Expires header

    (HTTP Response Header only) Choose one:

    • Don't add header -- Files in the directory are displayed in the browser or downloaded.
    • Add header only if application did not -- Files in the directory are CGI files to be executed on the server.
    • Always add header (override application's header)
    Note: If you choose to add a header, you must specify an expiration period -- either by specifying the number of days for which you want to enable this header, or a date after which you want to disable this header.

    Custom header

    (HTTP Response Header only) For each custom header you want to use, specify:

    • Name: The name of the response header.
    • Value: The value of the response header.
    • Override: Override application's header.
    • Applies to: Whether it applies to HTTP, HTTPS, or All (HTTP and HTTPS).
  5. Save the document.