Home

Results 1 to 2 of 2

Thread: Query string not being rewritten

Hybrid View

  1. #1
    thlo NNTP User

    Query string not being rewritten


    Hi,

    We have a webserver that has a login page that is loaded with a query
    string in the URL (if the user is not logged on).
    I uses the query string to redirect the browser back to the requested
    path after authentication.

    Example:
    Requested URL: https://server.domain/app1
    The webserver redirect to login page:
    http://tinyurl.com/m2rcs2t
    After login the user is redirected back to https://server.domain/app1

    Now - after placing this server behind NAM AG, everything works ok,
    except that the query string (and maybe other parts) is not rewritten,
    and the browser is redirected to the internal domain name.

    Example:
    Requested URL: https://NAMAG.domain/app1
    The webserver redirect to login page:
    http://tinyurl.com/omg4fgp
    After login the user is redirected back to https://server.domain/app1
    instead of https://NAMAG.domain/app1. And of course the internal name
    does not resolve on the Internet.

    I have tried adding rewriter policies (word and character) but nothing
    seem to help.

    Any suggestions?

    NAM AG version: 3.2.2.77 + IR1-107, IR2-117

    Regards,
    Tor Harald Lothe


    --
    thlo
    ------------------------------------------------------------------------
    thlo's Profile: https://forums.netiq.com/member.php?userid=2374
    View this thread: https://forums.netiq.com/showthread.php?t=52187


  2. #2
    thlo NNTP User

    Re: Query string not being rewritten


    Opened a support incident, and was given the reason for the rewriter
    problem:

    The redirect is initiated by a HTTP 302 redirect message which used the
    HTTP location header in order to define the redirect target. For the
    rewriter process it is just one href enclosed in a double string.
    An additional Char / Word rewriter policy will not work as wit will not
    rewrite any HTTP header values like the location header The page does as
    well include a simple href using the same URL in case a 302 would not
    work:
    ================================================== ========================
    <html>
    <head>
    <title>Object moved</title>
    </head>
    <body>
    <h2>Object moved to
    <a
    href="https://NAMAG.domain:4323/authentication/login?returnUrl=https://server.domain/app1">here</a>
    ..</h2>
    </body>
    </html>
    ================================================== ========================

    If you enclose the returnUrl into single quotes like:
    ================================================== ========================
    <a
    href="https://NAMAG.domain:4323/authentication/login?returnUrl='https://server.domain/app1'">here</a>
    ================================================== ========================
    it will get rewritten.

    --
    Tor Harald Lothe


    --
    thlo
    ------------------------------------------------------------------------
    thlo's Profile: https://forums.netiq.com/member.php?userid=2374
    View this thread: https://forums.netiq.com/showthread.php?t=52187


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •