Sun Java System Web Proxy Server 4.0.7 Administration Guide

localHostOrDomainIs()(host, hostdom)

ThelocalHostOrDomainIs()() function specifies local hosts that might be accessed by either the fully qualified domain name or the plain host name. See Example 2: Proxy Local Servers Outside the Firewall.

The localHostOrDomainIs()() function returns true if the host name matches the specified host name exactly or if there is no domain name part in the host name that the unqualified host name matches.

Parameters

host is the host name from the URL.

hostdom is the fully qualified host name to match.

Return Values

true or false

Examples

The following statement is true (exact match):

localHostOrDomainIs("www.example.com", "www.example.com")

The following statement is true (host name match, domain name not specified):

localHostOrDomainIs("www", "www.example.com")

The following statement is false (domain name mismatch):

localHostOrDomainIs("www.mcom.com", "www.example.com")

The following statement is false (host name mismatch):

localHostOrDomainIs("home.example.com", "www.example.com")