Show TOC

Procedure documentationDefining the Request Redirect Locate this document in the navigation structure

 

With the operations RegRedirectUrl and RegIRedirectUrl (case insensitive pattern match) you can redirect the client to another address (another server and/or another URL).

Procedure

Use the operations in the action file. You can find a description of the syntax under Manipulating URLs.

The substitution expression is set as the location header field in the HTTP response, and therefore the substitution expression determines the target of the redirect.

By default a temporary redirect is triggered (OK code 302). The HTTP OK code that is to be sent to the client can still be specified as an option. This can be specified as a numeric value in area 300-399 or with the predefined values permanent, temp and seeother.

You can make further specifications for redirects using Conditions: Redirect can be restricted to specific clients, protocols, and times.

Example

The line

RegIRedirectUrl ^/ping(.*) /sap/public/icman/ping$1

forwards a request starting with /ping (case insensitive) to the URL /sap/public/icman/ping. If there are more characters behind /ping, these are appended unmodified to the new URL /sap/public/icman/ping.

RegRedirectUrl / http://server.domain:8080/default.html [CODE=permanent]

forwards a request that only contains the backslash to the address http://server.domain:8080/default.html.

RegRedirectUrl ^/index.html(.*) /sap/bc/bsp/sap/ztest/index.html [CODE=temp]

forwards a request beginning with /index.html to /sap/bc/bsp/sap/ztest/index.html.