Previous Topic: nete:forward

Next Topic: nete:local

nete:redirect

The definition of the nete:redirect element is:

<!ELEMENT nete:redirect (#PCDATA)>

The nete:redirect element specifies a response that is returned to a user which redirects the user request to an appropriate destination server. The PCDATA follows the standard forward and redirect syntax. Once redirected, the SPS does not handle the completion of the request. Instead, the request is handled by the server that is the target of the redirection.

The <nete:redirect> and </nete:redirect> tags must be located on a single line in the proxy rules file. If they are not located on the same line, the SPS interprets line breaks as part of the URL contained in the element. This causes the redirect service to fail.

In the following example, the nete:redirect element redirects requests while maintaining the URI requested by the user. Unlike a nete:forward element, once the request has been redirected, the SPS is removed from the transaction, and the destination server provides resources directly to the user.

<nete:redirect>http://home.company.com$0</nete:redirect>

If a user’s request for http://www.company.com/hr/index.html meets a parent nete:case element’s criteria and is redirected by the above example, the user is redirected and the user’s browser displays the URL of the destination server fulfilling the request:

http://home.company.com/hr/index.html

Note: If you want to redirect a request over SSL, be sure to use https instead of http when defining the destination contained in the <nete:redirect> element.

More information:

Forward and Redirect Syntax