My Favorites


Please to see your favorites.

Configuring REWRITE for iChain2.0

(Last modified: 30Jul2002)

This document (10066302) is provided subject to the disclaimer at the end of this document.


Configuring REWRITE for iChain2.0


Rewrite Filter Configuration
Rewrite filter (rewrite.nlm) configuration is accomplished via text files. An example of a configuration file is given below:


html, htm


var xsport    ="9003"<<>> var xsport    ="443"
var xsname     ="xyz01"<<>> var xsname    ="www"
var xconnectMode = "http"<<>> var xconnectMode = "https"
<PARAM name=serverHost   value="xyz01.novell.com"><<>><PARAM name=serverHost  value="www.novell.com">
<PARAM name=serverPort  value="9003"><<>><PARAM name=serverPort  value="443">
<PARAM name=connectMode  value="https"><<>><PARAM name=connectMode  value="http"

[Name=<filtername>]: This is the name of the rewriter filter. It is used for filter identification in rwfilter commands.

[Extension]: The user can specify file extensions (in a single line) which need to be parsed. This section is optional, but if this section is not specified, all extension types will be parsed. Specifying this section will result in the parsing only specified extensions.

Conditions: All extensions should be specified in a single line (just after the Extensions section header). Individual extension elements should be separated by a comma.

For example:


Parses files with html extensions.
Parses http://www.novell.com/index.html.


not parse http://www.novell.com/logo.gif.
Does not parse http://www.novell.com.



html, htm, txt,  ,

Parses files with extensions html, htm, txt, and any default files implied by a trailing slash (/).
Parses http://www.novell.com/license.txt.
Parses http://www.novell.com/.
Does not parse http://www.novell.com/logo.gif.


This section lists all URLs to be parsed. The rules of URL specification are similar to the ACLCheck module as follows:

www.novell.com: Exact match
www.novell.com/contact/: All files in contact directory, but not in subdirectories.
www.novell.com/contact/*: All URLs starting with www.novell.com/contact, including subdirectories of contact.

[Replace]: The user can specify replacement pairs in this section. The string "<<>>" is used as a separator between the original string an the new string. The format is as follows:

<search string><<>><replacement string>

All the lines afer this Replacement section header will be treated as replacement string pairs, so this should be the last section in the file.

Conditions: The Replace section should be the last one in the file. Each replacement pair (including the last one) must be terminated with the end of the line.

The name of the filter module is REWRITE.NLM. Configuration files could be supplied as command line parameters to filter.

Filename restrictions: Rewrite.nlm does not place any restrictions on the configuration filename format, but files which do not conform to DOS filename format (8.3) format) could cause errors while loading the file.

Load Time Command Line Options: The load time command line option is: rewrite -s -f system/accell.rw -f etc/accel2.rw.


-s: Create separate screen for rewrite filter
-f: Config file. This is the file from which configuration information is loaded. The user can specify as many config files as required. In the example above, accell.rw and accel2.rw are two configuration files in the specified format.

Runtime Console Commands
The following runtime console commands are also implemented:

rwfilter unload <filtername>: Stops a filter (the filter name is as given in the configuration file).
rwfilter load <configFile>: Loads a filter config file.
rwfilter list: Lists all loaded rewrite filters by name.
rwfilter print <filtername>: Displays rewrite configuration information (the filter name is as given in the configuration). Printed information should be similar to the configuration file.

Replacement Rules
The following are simple rules that the iChain rewrite filter uses:

String replacement is done as a single pass.
String replacement is not performed recursively. For example:

If the original string is DOG, the rewritten string will be CAT. That is, only one replacement will occur (CAT will not be further replaced with CAT).

Since string replacement is done in one pass, the string that matches first will take precedence. For example:

If the original string is ABCDEFGH, the replaced string is XYZDEFGH.

If two user-specified strings match the data portion, the original string of higher length will be used for replacement except in cases detailed in point 3 above. For example:

If the original string is ABCDEFGH, the replaced string looks like PQRSTUVWXYZGH.

The rewrite filter module, REWRITE.NLM, applies only one matching filter (each configuration filter file constitutes a filter) for a request. If multiple filters match a request URL, the matching filter that was configured most recently will be used for data parsing..


The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.

  • Document ID:
  • 10066302
  • Solution ID: NOVL64404
  • Creation Date: 21Nov2001
  • Modified Date: 30Jul2002
    • NovellConnectivity Products

Did this document solve your problem? Provide Feedback