on 12-13-2011 7:30 AM
Hi experts,
does anybody have experience with modification handler of web dispatcher 7.3?
I tried to configure as mentioned at help.sap.com but meanwhile I guess that there are lot of errors in the documentation. Do you know a documentation / blog which works?
I will give you some examples:
1. http://help.sap.com/saphelp_nw73/helpdata/de/48/926708aa6b17cee10000000a421937/frameset.htm
RegRedirectUrl / http://server.domain:8080/default.html [CODE=permanent]
Meaning: forwards a request that only contains the backslash to the address http://server.domain:8080/default.html.
=> By using this rule you will get an infinite loop (if server.domain is the dispatcher). Rule
RegRedirectUrl ^/$ /start/default.html [CODE=permanent]
should work.
2. http://help.sap.com/saphelp_nw73/helpdata/de/48/9266faaa6b17cee10000000a421937/frameset.htm
If %{SERVER_PROTOCOL} !stricmp "https"
RegIRedirectUrl /sap/ (.*) https://%{HTTP_HOST}/sap/ $1 [code=permanent]
Meaning: If the protocol used is not HTTPS, the request is reformulated for HTTPS.
=> This rule is incorrect because of the spaces
3. http://help.sap.com/saphelp_nw73/helpdata/de/48/9266faaa6b17cee10000000a421937/frameset.htm
It should be possible to use multiple conditions, e.g.
If %{REMOTE_ADDR} regmatch 192.168.* [OR] If %{REMOTE_ADDR} regmatch 10.*
RegIRedirectUrl ....
=> This rule does only work if you try to access with IP 192.168.*. The second condition does not work. Regular expression
If %{REMOTE_ADDR} regmatch ^((192.168.*)|(10.*))
works.
4. If you want to format the action file like
If ....
<tab> RegIRedirectUrl ...
the Redirect will never be performed.
Furthermore I was unable to find something like else or endif. What does that mean? Is it only possible to write ONE rule after an if-condition? How do you create an else block? Something like that?
If %{REMOTE_ADDR} regmatch ^((192.168.*)|(10.*))
RegRedirectUrl ...
If %{REMOTE_ADDR} !regmatch ^((192.168.*)|(10.*))
RegRedirectUrl ...
Many thanks in advance.
Regards
Danny
Hi Oliver,
thank you for you reply.
Did you ever try to use the OR element? I used "AND" succesfully but "OR" does not work in my case.
Do you know a good documentation (especially for options like break, skip, compound, ...)?
Regards
Danny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danny,
I do use successfully the modification handler of Sap Web Dispatcher 7.2 to detect web browsers which are not Internet Explorer and to refuse access from a specific IP address.
Here is my code as an exemple :
if %{REMOTE_ADDR} stricmp "xxx.xxx.xxx.xxx" [AND]
if %{PATH} !stricmp "/errors/WrongBrowser.htm" [AND]
if %{PATH} !stricmp "/errors/WrongProxy.htm"
RegIRedirectUrl ^/(.*) /errors/WrongProxy.htm [skip]
if %{HEADER:USER-AGENT} !regmatch ^(.*)MSIE [AND]
if %{PATH} !stricmp "/errors/WrongBrowser.htm"
RegIRedirectUrl ^/(.*) /errors/WrongBrowser.htm [skip]
I guess you are right about the lack of "else" and "endif".
Regards,
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.