SPUEdit is a rarely used directive that allows EZproxy administrators fine-grained control over the starting point URL to which users are directed.
SPUEdit is a position-dependent, repeatable config.txt directive that interacts with AutoLoginIP, ExcludeIP, IncludeIP, and other SPUEdit directives. SPUEdit directs EZproxy to edit starting point URLs using regular expressions to allow URLs to be rearranged and then users to be rerouted to the rearranged URLs.
The SPUEdit directive takes the following form:
SPUEdit / find/ replace/ girs
The following table describes the qualifiers used with the SPUEdit directive:
||Any non-alphabetic, non-digit character.|
||A Perl-style regular expression to match.|
The string to use to replace the expression in find. This string may contain variables including:
An optional combination of letters used to indicate that:
For SPUEdit to be effective, the final rule must include the redirection option (r).
The following example shows how to remap URLs that point to http://web.somedb.com and make them point to http://www.somedb.com instead:
Note the use of @ instead of / between the find, replace, and options. If / had been used, each of the slashes that appear in the find and replace strings would need to be specified using \/ instead of just /.
While developing SPUEdit directives, you can add:
to config.txt to direct EZproxy to record the SPUEdit manipulations of starting point URLs to messages.txt.
An SPUEdit directive can be set to apply only if the user's IP address falls within a current AutoLoginIP, ExcludeIP, and/or IncludeIP range. To select when a rule applies, use one of:
SPUEdit -AutoLoginIP ...
SPUEdit -ExcludeIP ...
SPUEdit -IncludeIP ...
SPUEdit -AutoLoginIP -ExcludeIP ...
SPUEdit -AutoLoginIP -IncludeIP ...
SPUEdit -ExcludeIP -IncludeIP ...
In the absence of any of these qualifiers, the SPUEdit applies regardless of the type of source IP. These qualified lines are position-dependent, so they should be arranged in config.txt after relevant AutoLoginIP, ExcludeIP, and/or IncludeIP directives.
This page last revised: September 23, 2015