Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Webdispatcher: Syntax error using modification handler


I have a problem with our webdispatcher (7.42 Patchlevel 224) on a SuSe Linux System. I want to use it for multiple systems by using the modification handler like in

Configuring SAP Web Dispatcher to Dispatch Requests to Different Systems - User Interface Add-On for SAP NetWeaver - SAP…

wdisp/system_conflict_resolution = 1 is set and I defined a modification file:

icm/HTTP/mod_0 = PREFIX=/,FILE=/usr/sap/WDP/SYS/profile/modification_rule.txt

I want to modify the target sid depending on the URL. If the statement „o=SCM“ is in it, SCM should be set via SetHeader.

if %{PATH} regimatch *o=SCM*

SetHeader x-sap-webdisp-target-sid SCM [break]

When I enter this statement in modification_rule.txt the webdispatcher will not start.

FATAL: HttpModHandlerInit: Error processing rule file /usr/sap/WDP/SYS/profile/modification_rule.txt: syntax error in line 2: >if %{PATH} regimatch *o=SCM*     <. See SAP note 1918448.

The syntax error seems to be related to the asteriscs (*) because a statement like

if %{PATH} regimatch o=SCM

SetHeader x-sap-webdisp-target-sid SCM [break]

works, but is the wrong regular expression and can not be used for my purposes. What ist the problem with the asteriscs? I tried it with "*o=scm*" and '*o=SCM*'. The later does not give the syntax error but again its the wrong regular expression.

Any idea is welcome...


  Best regards


Former Member

Hi Harry,

Please find below,  the meaning of *:


The * (asterisk or star) matches when the preceding character occurs 0 or more times, for example, tre* will find tree (e is found 2 times) and tread (e is found 1 time) and trough (e is found 0 times).


if you define *o=SCM*, since there is nothing in front of o=SCM, therefore, the syntax error occurs.

in this case, I think you should define modification rule file like below:

if %{PATH} regimatch .*o=SYS.*

SetHeader x-sap-webdisp-target-sid SCM [break]

if the statement o=SCM in it, then SCM will be set via SetHeader.

The . (period) means any character(s) in this position.

Best regards,

Shi Feng

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question