Skip to Content
avatar image
Former Member

Web Dispatcher Redirect url is not wokring

Hi All,

I have a req to redirect from url https://crestrondev.xxx.com/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_SALESFORCE to http://sappodev.xxx.xxx.com:50000/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_SALESFORCE I verified the target url is working. I am using parameter

PREFIX=/, FOR=crestrondev.xxx.com, FROM=/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_SALESFORCE, FROMPROT=https, PROT=http, TO=/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_SALESFORCE, HOST=sappodev.xxx.xxx.com, PORT=50000

Also I enabled SSL_ENCRYPT=0. The redirect is not happening. Do I need to add additional parameters? The source url is just dummy url. Please advise.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 02 at 11:38 PM

    Hi,

    On the redirect handler, the FOR must be a combination of hostname + port, like FOR=<host>:<port> .You can use wildcards like "*" also.

    You cannot use query strings on redirect handler. So, everything until before the question mark (?) is valid, but after that you cannot use.

    A redirect like following should work:

    icm/HTTP/redirect_0 = PREFIX=/, FOR=crestrondev.xxx.com:*, FROM=/XISOAPAdapter/MessageServlet, FROMPROT=https, PROT=http, HOST=sappodev.xxx.xxx.com, PORT=50000

    Note that I have removed the option TO because, if the URL + query string is the same on the destination, the redirect handler will just copy it. On the above example, all access using hostname "crestrondev.xxx.com" and URL "/XISOAPAdapter/MessageServlet" returns a redirect to host sappodev.xxx.xxx.com on port 50000 using the protocol http.

    Regards

    Clebio

    Add comment
    10|10000 characters needed characters exceeded

  • May 02 at 04:32 PM

    Hello Kavitha Rajan,

    You can use modification handler for it. Look in to SAP wiki page as below

    https://wiki.scn.sap.com/wiki/display/SI/How+to+configure+Web+Dispatcher+to+redirect+to+a+custom+start+URL

    SAP HELP page : https://help.sap.com/viewer/bd78479f4da741a59f5e2a418bd37908/7.4.19/en-US/7dad0fd8146c426ca304e54fd36202d2.html

    In my case I was forwarding to SID and code example is as below

    if %{HTTP_HOST} regimatch QASServer.domain.com* [and]
    if %{PATH} regimatch ^/sap/opu/*
    SetHeader x-sap-webdisp-target-sid XXX [break]
    
    if %{HTTP_HOST} regimatch QASServer.domain.com* [and]
    if %{PATH} regimatch ^/sap/bc/bsp/*
    SetHeader x-sap-webdisp-target-sid XXX [break]
    
    if %{HTTP_HOST} regimatch QASServer.domain.com* [and]
    if %{PATH} regimatch ^/sap/bc/ui5_ui5/*
    SetHeader x-sap-webdisp-target-sid XXX [break]
    
    if %{HTTP_HOST} regimatch QASServer.domain.com* [and]
    if %{PATH} regimatch ^/sap/bc/webdynpro*
    SetHeader x-sap-webdisp-target-sid ABC [break]
    
    if %{HTTP_HOST} regimatch QASServer.domain.com* [and]
    if %{PATH} regimatch ^/sap/bc/gui/sap/its/webgui/*
    SetHeader x-sap-webdisp-target-sid  ABC [break]
    
    
    

    Hope this helps

    -Yogesh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Yogesh,

      I will try this option if the other one did not work at all. And will update you. Also not sure what rule should I use for my req.

      Thanks,

      Kavitha Rajan