Anonymous_User Absent Member.
Absent Member.
178 views

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

0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

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

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.