Change path of request

2 posts, 0 answers
  1. Vladimir
    Vladimir avatar
    2 posts
    Member since:
    Feb 2015

    Posted 06 Feb 2015 Link to this post

    Hello!

    I have a problem with changing path of request.

    I have url:
    http://54.56.212.65/Test/ServerTest.do?protocol-version=9&client-login=7d29289c8fad51063e9b3c85cc1a69b4
    And I need to change IP with a Path to:
    http://12.62.52.32/Release/Server.do?protocol-version=9&client-login=7d29289c8fad51063e9b3c85cc1a69b4

    But 'client-login' changing every time after request.
    So oSession.PathAndQuery not work.
    //
            if (oSession.host=="54.56.212.65") {
                oSession.host="12.62.52.32";

            if (oSession.PathAndQuery=="/Release/ServerTest.do") {
                oSession.PathAndQuery = "/Test/Server.do";
    //
    How can I change only Path and filename without checking values after '.do'?
    Doesn't work...
    Help please.(


  2. Vladimir
    Vladimir avatar
    2 posts
    Member since:
    Feb 2015

    Posted 06 Feb 2015 in reply to Vladimir Link to this post

    Problem resolved.
    I'v used
            if (oSession.host=="54.56.212.65") {
               oSession.PathAndQuery = oSession.PathAndQuery.Replace("Release","Test");
            }
Back to Top