You can modify an HTTP request from the HTTP server (SAP Web Dispatcher or Internet Communication Manager) before it is forwarded to the application server. You define HTTP requests that you want to modify in an action file. Here you can define HTTP header field modifications, such as delete, change, and add HTTP header fields, as well as URL modifications, such as URL rewrites, URL redirects, and URL filters. You can use conditions to link modification actions.
You define modification actions you want to execute in separate lines in a text file. One line in the action file defines precisely one modification action. The sequence in the action file defines the sequence of execution too. When an HTTP request arrives, the modification actions defined in the action file are processed in succession. In the event of a successful URL filtering or URL redirect, rule processing stops. Blank lines and comment lines are ignored when the file is executed. Comment lines are indicated by a preceding # character.
Caution
Lines:
RegIRewriteUrl ^/dtcsld(.*) /sld$1
RegForbiddenUrl /(.*) –
always send "forbidden" as the response to the HTTP client because all rules are applied in succession. If you do not want subsequent modifications to be executed after the first modification action has been applied, you have to specify this by adding a modifier (option) [break] in the relevant line.
RegIRewriteURL ^/dtcsld(.*) /sld$1 [break]
Use parameter icm/HTTP/mod_<xx> to specify the action file and to activate the modification defined in it. To improve performance, we recommend that you configure only one rewrite handler. Note that modifications in the action file are not activated until the Internet Communication Manager or SAP Web Dispatcher is restarted. If you want to activate modifications in the action file while the system is running, you have to activate them explicitly in smicm or in the ICM Web administration interface.
Syntax
# Modification rules for WebDisp
# set WebDisp header
SetHeader clientProtocol %{SERVER_PROTOCOL}
SetHeader X-SAP-WEBDISP-AP %{SERVER_ACCESS_POINTS}
# check for forbidden method
if %{REQUEST_METHOD} !stricmp "GET" [AND]
if %{REQUEST_METHOD} !stricmp "POST"
RegForbiddenURL ^/(.*) -
# default request
RegRewriteURL ^/$ /index.html
# Url rewriting
if %{HTTP_HOST} regimatch ldp*
RegIRewriteURL ^/ping(.*) /sap/public/icman/ping$1
Syntax
SetHeader clientProtocol % {SERVER_PROTOCOL}
The header field clientProtocol is set to the value of the variable SERVER_PROTOCOL
Syntax
SetHeader X-SAP-WEBDISP-AP % {SERVER_ACCESS_POINTS}
The header field X-SAP-WEBDISP-AP is set to the value of the variable SERVER_ACCESS_POINTS
Syntax
if %{REQUEST_METHOD} !stricmp "GET" [AND]
if %{REQUEST_METHOD} !stricmp "POST"
RegForbiddenURL ^/(.*) -
Only data sent with the GET or POST method is allowed: If the data is not sent with GET or POST, the caller receives HTTP error FORBIDDEN.
Syntax
RegRewriteURL ^/$ /index.html
URLs that consist only of the backslash ("/"), are rewritten in /index.html.
Syntax
if %{HTTP_HOST} regimatch ldp*
RegIRewriteURL ^/ping(.*) /sap/public/icman/ping$1
If the host name (value of variable HTTP_HOST) starts with ldp*, in URLS that start with /ping, the /ping is replaced with /sap/public/icman/ping.