JANUS WEB REDIRECT: Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 8: Line 8:




'''Portname''', '''method''', and '''url''' are explained in the [[JANUS WEB]] command.  
<var class="term">portname</var>, <var class="term">method</var>, and <var class="term">url</var> are explained in the <var>[[JANUS WEB]]</var> command.  


'''redir_url''' is the URL to which requests that match the pattern in '''url''' are redirected.  
<var class="term">redir_url</var> is the URL to which requests that match the pattern in <var class="term">url</var> are redirected.  


Just as '''url''' can contain wildcard characters, '''redir_url''' can also contain wildcard characters. The wildcard characters in '''redir_url''' are replaced with the characters that matched the corresponding wildcard characters in '''url''' at the time of the request.
Just as <var class="term">url</var> can contain wildcard characters, <var class="term">redir_url</var> can also contain wildcard characters. The wildcard characters in <var class="term">redir_url</var> are replaced with the characters that matched the corresponding wildcard characters in <var class="term">url</var> at the time of the request.


For example, given the following rule, a request for URL <tt>/JUNK/MAIN.HTML</tt> is redirected to <code>HTTP://LOCAL.NTBOX.COM/JUNK/MAIN.HTML</code>:
For example, given the following rule, a request for URL <tt>/JUNK/MAIN.HTML</tt> is redirected to <code>HTTP://LOCAL.NTBOX.COM/JUNK/MAIN.HTML</code>:

Revision as of 22:33, 30 August 2012

<section begin="desc" />WEB REDIRECT<section end="desc" />

The JANUS WEB REDIRECT subcommand identifies the URL to which incoming URL requests that match a specified pattern are redirected.

Syntax

<section begin="syntax" /> JANUS WEB portname REDIRECT [method] url redir_url <section end="syntax" />


portname, method, and url are explained in the JANUS WEB command.

redir_url is the URL to which requests that match the pattern in url are redirected.

Just as url can contain wildcard characters, redir_url can also contain wildcard characters. The wildcard characters in redir_url are replaced with the characters that matched the corresponding wildcard characters in url at the time of the request.

For example, given the following rule, a request for URL /JUNK/MAIN.HTML is redirected to HTTP://LOCAL.NTBOX.COM/JUNK/MAIN.HTML:

JANUS WEB WEBPORT REDIRECT /JUNK/* HTTP://LOCAL.NTBOX.COM/JUNK/*

The redirection URL can be an absolute URL (that is, http:// and the host name along with a path), or it can be a relative URL (containing only the path). Thus a redirect can redirect to another machine, another port on the same machine, or simply another path on the same port on the same machine. All of these types of redirection can be useful at times.

See also