Entering content frame

Procedure documentation icm/HTTP/redirect_<xx> Locate the document in its SAP Library structure

This parameter is used to define a HTTP redirect (301).If the client attempts to access the URL in question, the server sends a redirect. This forces the client to access the new destination instead.

If this parameter is set, it calls the redirect subhandler of the HTTP plug-in. The HTTP request is therefore not sent to the backend (ABAP or J2EE server).Structure linkProcessing HTTP Requests describes the subhandler call sequence.

Value Range

Unit

Default value

icm/HTTP/redirect_<xx> = PREFIX=<URL prefix>[, FROM=<pattern for URL>, FROMPROT=<incoming protocol>, TO=<new URL prefix>, PROT=<protocol>, HOST=<host>, PORT=<port number/name>]

<xx> must be specified in ascending order from 0.

With the optional parameters FROM and FROMPORT special requests can be selected for which a redirect is to be created:

·        FROM

Pattern with wildcards * (character string) and ? (one character)

For example, the pattern /sap/* matches all requests beginning with /sap.

If FROM is not specified the redirect for URLs which match the PREFIX exactly is created.

·        FROMPROT  

Value ranges: http or https. This argument is used to restrict requests to one receive protocol. If FROMPROT is not specified, a redirect is created for all protocols.

You can use optional parameters PROT, HOST, PORT and TO to set the destination to a different protocol, a different host, a different port, or to a different URL. You can only specify the port and protocol once you have specified a host name. If you specify the PROT or PORT you also have to specify the HOST.

If the parameter TO is defined it describes the exact URL to which a request is forwarded. With TO no variable from the URL derived from the original URL can be created.

The default values for PROT, HOST PORT and TO are values that are set when an incoming request is received.

 

Example

icm/HTTP/redirect_0 = PREFIX=/, TO=/bc/bsp/demo/default.html

Access attempts on "/" are redirected to "/bc/bsp/demo/default.html".

 

If you want to redirect requests with specific URL patterns to a different server:

icm/HTTP/redirect_0 = PREFIX=/, FROM=/mime/*,HOST=mimeserver, PORT=8080

 

If you want to redirect HTTP requests with a specific URL to HTTPS:

icm/HTTP/redirect_0 = PREFIX=/sap/bc/bex, FROMPROT=http, PROT=https, HOST=px155.sap.com

 

If you want to redirect only specific HTTP requests to HTTPS:

icm/HTTP/redirect_0 = PREFIX=/, FROM=/sap*, FROMPROT=http, PROT=https, HOST=px155.sap.com

 

If you want to redirect all HTTP requests to HTTPS:

icm/HTTP/redirect_0 = PREFIX=/, FROM=*, FROMPROT=http, PROT=https, HOST=px155.sap.com

 

Character string

None

 

 

Leaving content frame