on 10-02-2014 8:55 AM
Hi experts,
I use the modification rule to limit the access of our websites.
Therefore I made the following entries:
if %{HTTP_HOST} regimatch www.dummy.com [and]
if %{PATH} regimatch "^/sap/*"
SetHeader x-sap-webdisp-target-sid <SID> [break]
This means, that just www.dummy.com/sap/* pages are allowed.
So, but we also use to redirect www.dummy.com to www.dummy.com/sap/*.
But this redirect seams to happen after the modification file, so after the rule.
Because the www.dummy.com is now blocked.
So how can I now achieve, that also www.dummy.com is allowed.
BUT! Just www.dummy.com without any directlink at the end.
Because if I also add e.g.
if %{HTTP_HOST} regimatch www.dummy.com [and]
if %{PATH} regimatch "^/"
SetHeader x-sap-webdisp-target-sid <SID> [break]
Everything is unlocked again (www.dummy.com/<every page>.
Thanks for help
Hi Christian,
Why not just use a redirect rule similar to the one mentioned in the documentation:
RegRedirectUrl / http://server.domain:8080/default.html [CODE=permanent]
Source:
Redirecting URLs - SAP Web Dispatcher - SAP Library
Best,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried the following, but does not really work
In the modification file I entered (just an example!)
if %{HTTP_HOST} regimatch wwwx.*
RegRedirectUrl / http://wwwx.<domain>/z_service [CODE=permanent]
if %{HTTP_HOST} regimatch wwwx.* [and]
if %{PATH} regimatch "^/z_service*"
SetHeader x-sap-webdisp-target-sid <SID> [break]
So in my opinion, it should now work like this.
The first step if a request for wwwx.<domain> is coming, it will modify the url to wwwx.<domain>/z_service.
So the next step is, that just for wwwx* the /z_service services are allowed.
So it should be ok and the SID should be set.
But it is not working.
Do you have an idea whats my mistake?
May it be, that only / in (regredirecturl / ...) does not mean redirecting for www.<domain>; ???
Seems to be solved now.
I have to use ^/$ instead of just /.
So it is really just for www.domain/ pages.
Hi Christian,
Just for reference:
Pattern matching is used for operator "regimatch". That's why you need the ^$ to delimit the pattern.
For exact string comparison, you could use the operator "strcmp/stricmp", e.g. the following would work as expected:
if %{PATH} strcmp "/"
RegRedirectUrl and RegRewriteUrl always work with pattern matching (that's why they are called "Reg"), so the example I quoted earlier from the documentation is actually wrong
It should also be:
RegRedirectUrl ^/$ http://...
Best,
Tobias
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.