Advertising banner:
 
 
 A117
 
2192004_15045_0.png81203_43840_19.png



HeaderMatch syntax
Internet Services reads the HeaderMatch document on a line-by-line basis, where each line can be either a comment or a HeaderMatch command. Lines that contain only white space or begin with a pound sign (#) are comments. All other lines are command lines.
        Note
You must place double quotes ("") around a string if it contains spaces or tabs.
A HeaderMatch command can have two or three components: a site specifier, an action and, optionally, a condition using the following syntax:
site specifier: [condition] action
where
•       site specifier specifies which sites will be affected by the command
•       condition defines a set of particular conditions to trigger the action
•       action is the action to perform.



Site specifier
If you have used the Multiple Sites and Languages form to configure multiple sites, you can specify which site should be affected by a given command using the site alias as the site specifier, see Browser steering examples. If the site has multiple languages, you can specify a language by adding a period after the site alias followed by the name of the language folder you want the command to affect. If you have not used the Multiple Sites and Language form, or if you want a command to affect all sites, you use an asterisk (*) as the site specifier.



Condition
Use a condition only when you want to execute a command under certain circumstances. For example, you may have a template set that only works with one type of browser (see Browser steering examples) or you may want to disable some advanced feature on a particular site for a particular browser.
The condition argument can take three forms:
•       a test of one of the browser's HTTP headers
•       a test of a site preferences field
•       a test of an Internet Services script variable.
To test an HTTP header, use this syntax:
IF http header name [ == | != ] <regular expression>
where
•       http header name is the name of the HTTP header you wish to examine, for example "user-agent"
•       regular expression defines a pattern to be matched against the value of the header in question
To test the value of a site preferences field, use this syntax:
IF SITEPREF FieldID[.Index][== | != | > | < | >= | <=] value
where
•       FieldID[.Index] retrieves field data from the appropriate site preferences form
•       [== | != | > | < | >= | <=] are logical operators
•       value is a value to test the value the preferences field in question
To test the value of an Internet Services script variable, use this syntax:
IF VAR variablename [== | != | > | < | >= | <=] value
where
•       variablename is the name of the Internet Services script variable
•       [== | != | > | < | >= | <=] are logical operators
•       value is a value to test the value of the Internet Services script variable in question.



Action
The action is what you want the command to actually do. Actions fall into two categories: SET actions, which are used to control certain aspects of HTTP's internal behavior and VAR actions, which set Internet Services script variables.
VAR actions
VAR actions take the form:
•       VAR variablename = value
This sets (or reset) the value of an IS Script variable with the specified name to the value given. You can reference variables defined in this manner either later in the HeaderMatch document or in the templates.
SET actions
An important thing to remember about SET commands is that each parameter may only be configured once during the execution of the HeaderMatch document. If a second SET command is issued for the same parameter, it will be ignored.
        Note
If a condition prevents a SET command from execution, this does not count as the single configuration allowed for a given SET parameter. SET parameters are case sensitive.
The SET parameters and their possible values:
•       SET .templates = foldername
        This parameter changes the name of the folder from which Internet Services uses to load templates. You can use this syntax to set up multiple template sets to be used on a single site depending on certain conditions, for example, different template sets for different browsers. Accessing different template sets based on what browser you use is called  browser steering.
•       SET calview = formID
        This parameter changes the default formID used when viewing calendars. Normally, all calendars open in week view (formID 159) by default, but you may wish to override this behavior. Other form IDs you may want to use here are: 167 (Daytimer view), 164 (Today view), 160 (Daily View), 158 (Monthly View) and -1 (List View).
•       SET calendaroptions = bitmask
This parameter controls certain behaviors of Internet Services calendars. The default value for calendaroptions is 0x0006 (for example, 0x0002 + 0x0004).
•       0x0001
Activates a legacy calendar field data format. If this is not set, calendar templates included in or based on template sets distributed with Internet Services 5.5 or earlier will not function correctly.
•       0x0002
Include first day of week calculations. If not set, calendars are all calculated using Sunday as the first day of the week.
•       0x0004
Calculate All Day Events. If not set, modem daytimer views will not function correctly. If set, templates for daytimer views included in or based on template sets distributed with Internet Services 7.1 or earlier will not function correctly.
•       SET allowbasicauth = 1 | 0
        This parameter enables or disables the use of the browser's internal authentication mechanism. By default, browser authorization is disabled.
•       SET contenttype = MIME type
        This parameter overrides which content type Internet Services tries to use when loading and sending templates. For instance, some older WAP/WML browsers do not correctly ask for WML content. You can force Internet Services to try and use WML templates (if you have them on your system) by configuring the contenttype to an appropriate value.
•       SET forcehttpver10 = 1 | 0
•       SET keepalive = 1 | 0
•       SET allowhttptrace = 1 | 0
The forcehttpver10 and keepalive SET variables control how an HTTP server handles connections. You should only set them on the recommendation of Open Text customer support.
•       setting allowhttptrace enables or disables the HTTP "TRACE" command. By default,TRACE is disabled.
        Note
While the TRACE command is a part of the HTTP specifications, it is not used in standard operations and some security organizations believe it to be a privacy risk.
•       SET icons = icons file name
•       SET pictures = pictures file name
        These parameters can be used to override the Internet Services default icon and picture resource files. By default, Internet Services looks for icons in the icons.rez file and pictures in the pictures.rez file. However, sometimes when running multiple template sets on a single site it becomes necessary for one of those template sets to use alternate icon or picture resources. In this case, the SET actions can be used to enable the alternate resources under the right circumstances.



hirosue Shino Web Site