JANUS WEB REDIRECT: Difference between revisions
m (remove displaytitle) |
|||
Line 2: | Line 2: | ||
<span class="pageSubtitle">WEB REDIRECT</span> | <span class="pageSubtitle">WEB REDIRECT</span> | ||
The JANUS WEB REDIRECT subcommand identifies the URL to which incoming URL requests that match a specified pattern are redirected. | The <var>JANUS WEB REDIRECT</var> subcommand identifies the URL to which incoming URL requests that match a specified pattern are redirected. | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">JANUS WEB portname REDIRECT [method] url redir_url | <p class="syntax">JANUS WEB <span class="term">portname</span> REDIRECT [<span class="term">method</span>] <span class="term">url redir_url</span> | ||
</p> | </p> | ||
Line 13: | Line 14: | ||
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. | 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 < | For example, given the following rule, a request for URL <code>/JUNK/MAIN.HTML</code> is redirected to <code>HTTP://LOCAL.NTBOX.COM/JUNK/MAIN.HTML</code>: | ||
<p class="code"> JANUS WEB WEBPORT REDIRECT /JUNK/* HTTP://LOCAL.NTBOX.COM/JUNK/* | <p class="code">JANUS WEB WEBPORT REDIRECT /JUNK/* HTTP://LOCAL.NTBOX.COM/JUNK/* | ||
</p> | </p> | ||
The redirection URL can be an absolute URL (that is, < | The redirection URL can be an absolute URL (that is, <code>http://</code> 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== | ==See also== | ||
<ul> | <ul> | ||
<li>[[JANUS WEB NOREDIRECT]] | <li><var>[[JANUS WEB NOREDIRECT]]</var></li> | ||
<li>[[List of Janus commands]] | <li>[[List of Janus commands]]</li> | ||
<li>[[List of JANUS WEB subcommands]] | <li>[[List of JANUS WEB subcommands]]</li> | ||
<li>[[Defining Web rules | <li>[[Defining Web rules]]</li> | ||
<li>[[List of Janus Web Server $functions]] | <li>[[List of Janus Web Server $functions]]</li> | ||
</ul> | </ul> | ||
[[Category:JANUS WEB subcommands|JANUS WEB REDIRECT]] | [[Category:JANUS WEB subcommands|JANUS WEB REDIRECT]] |
Latest revision as of 20:56, 27 January 2016
WEB REDIRECT
The JANUS WEB REDIRECT subcommand identifies the URL to which incoming URL requests that match a specified pattern are redirected.
Syntax
JANUS WEB portname REDIRECT [method] url redir_url
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.