on 11-20-2008 2:12 PM
Hello All!
I need to redirect users from one URL (http://webdispatch:port1/abc/efg) to another (http://host2:port2/abc/efg) but URL in browser must stay unchanged (http://webdispatch:port1/abc/efg) after redirect. As I think server should get requested URL from browser, internally redirect to URL #2 and send response of URL #2 to browser.
I've set up Web Dispatcher for redirecting by using parameter icm/HTTP/redirect_0, but now URL in browser is changing with http://host2:port2/abc/efg
icm/HTTP/redirect_0 = PREFIX=/,FOR=webdispatch:,FROM=/sap/bc/webdynpro/sap/zwd_rep,HOST=host2,PORT=port2
How I can do it?
Helpful answers will be appreciated
Regards, Lev
Hello Lev,
Have you set up a permission table? Check if parameter wdisp/permission_table is in your web dispatcher instance profile.
Regards,
Ayax
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What you describe is not URL redirect, it is just the standard job of an HTTP reverse proxy like the SAP Web dispatcher.
You just need to connect the web dispatcher to the http port of the message server of host2.
There is non need to use icm/HTTP/redirect_0
Regards,
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Salut Olivier,
You got the idea of it, but I would argue the definition a bit.
Lev described URL redirect, where user is redirected, "asked to go somewhere else", it is correct.
The issue is that in order for URL to stay the same in the web browser, he needed "URL forwarding" or "URL routing" and not URL redirect. In this case web dispatcher operates as a true reverse proxy, meaning web dispatcher presents servers to users (not the other way, hence additional word "reverse").
You got the main idea - it is not possible to keep URL intact and present different content, using
icm/HTTP/redirect_0.
Lev did not mention that host2 is an SAP host, so I suggested two solutions in my previous post:
one with message server and another with icr file.
I just want to keep terminology clear.
À Bientôt,
Slava
Edited by: Slava Plyushchikov on Nov 20, 2008 11:58 AM
Lev,
This will depend on what your host2 is.
If it is a SAP J2EE engine, like EP and you need to do a load balancing, then connect you web dispatcher to host2 message server. You will get a load balancing and URL will stay webdispatch.
Use
rdisp/mshost = <host2>
ms/http_port = <HTTP message server port od host2>
If you do not need load balancing, which looks like your case, regardless of the type of host2, you can use web dispatcher as a router.
Create a file info.icr with the following context:
Version 1.0
SYS
J2EE <host2> <port2> DIA=2
Use the following parameter in pfl:
wdisp/server_info_location = <full path>/info.icr
Regards,
Slava
А если что - пиши, поможем...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Slava!
Thank you for reply!
I've tried to use info.icr, but got an error.
I've added following at the end of pf:
wdisp/server_info_location = D:\usr\sap\WDC\SYS\profile\info.icr
then I've created info.cr:
Version 1.0
SYS
J2EE crmdev.oao.sng 8010 DIA=2
An error was:
403 Access denied
You do not have the permissions to access this resource
-
Error: -13
Version: 7000
Component: HTTP_ROUTE
Date/Time: Fri Nov 21 11:01:03 2008
Module: http_route.c
Line: 2759
Server: crmdev_WDC_30
Error Tag:
Detail: permission denied for /b2b_sng/b2b/init.do
What is going?
Lev,
This error is a good sign, because it works.
You just need to finish config.
It looks like you have a wrong port number in
J2EE crmdev.oao.sng 8010 DIA=2
8010 is probably an HTTP message server port.
It would work for option 1 I gave you, but for option 2 it should be HTTP port of your SRM J2EE Engine.
What is your target destination exactly?
If it is http://crmdev.oao.sng:51000/b2b_sng/b2b/init.do
use
J2EE crmdev.oao.sng 51000 DIA=2
You got the idea:
take your target URL and use hostname and port in the icr file.
Or else use option 1 without icr file
rdisp/mshost = crmdev.oao.sng
ms/http_port = 8010
Regards,
Slava
Edited by: Slava Plyushchikov on Nov 21, 2008 5:36 AM
Edited by: Slava Plyushchikov on Nov 21, 2008 5:55 AM
Thanks for your replies.
I've tried to comment wdisp/permission_table parameter but it had no effect. And it seems that I've made a mistake: I forgot to comment icm/HTTP/redirect_0 while tested work of icr file.
I have:
web dispatcher at webdisp_host:1090
host with ABAP+Java instance at inst_host
icm/HTTP/redirect_0 commented
use icr file:
>Version 1.0
>SYS
>J2EE crmdev.oao.sng 8010 DIA=2
At inst_host I has two apps:
/b2b_sng/ ( inst_host:50000/b2b_sng/ )
and /sap/bc/* ( inst_host:8010/sap/bc/webdynpro/* )
webdisp_host:1090/b2b_sng/ works fine.
webdisp_host:1090/sap/bc/webdynpro/* don't work:
500 Dispatching Error
Error: -26
Version: 7000
Component: HTTP_ROUTE
Date/Time: Mon Dec 01 17:41:24 2008
Module: http_route.c
Line: 3121
Server: crmdev_WDC_30
Error Tag:
Detail: no valid destination server available for '!ALL' rc=13
Slava,
> 8010 is probably an HTTP message server port.
I think no since inst_host:8010/sap/bc/webdynpro/* working fine.
Parameters
> rdisp/mshost = crmdev.oao.sng
> ms/http_port = 8010
has been already added into profile, but http_port = 8101 instead 8010
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.