Previous Page: Internal Rewriter  Next Page: Internal Rewriter Features

Custom Rewriter

The Novell iChain custom rewriter is used to search and replace specific text within a text file. For example, a user may want to change all occurrences of "President Clinton" to "President Bush". The custom rewrite will not touch data within the HTTP header.

The custom rewriter must be loaded by running "REWRITE.NLM" from the system console. For more information, see Custom Rewriter --- Rewrite Filter.

The custom rewriter was developed because of the need to replace URL text pieces. For example, a document could have the following JavaScript variables:

var scheme = "http://"
var host = "internal.web.site.com"
var path = "/path/"
var file = "file1.html"
var URL = scheme + host + path + file;

These variables are used to build URL strings for the user. The internal rewriter can only rewrite true URL references such as http://internal.web.site.com/path/file1.html to the schema and host name of the accelerator that accesses the internal Web site (https://mycompany.com/path/file1.html).

The custom rewriter has an overlapping region problem when used in conjunction with the internal rewriter. If both rewriters want to change the same characters of data within a file, it is undefined which rewriter will win out. In some cases, a couple of characters around the rewritten area will be lost or added. This problem happens when the custom rewrite is used to rewrite the same URLs that the internal rewriter also rewrites. The custom rewriter was not developed to search and replace full URL references; only URL pieces (as shown in the above example).



  Previous Page: Internal Rewriter  Next Page: Internal Rewriter Features