I am trying to configure SPS and currently the flow isn't working correctly. Let's use frontend.com and backend.com/target for this example.
Proxy rules is ...
1.User types in frontend.com/ and login page is served as expected showing frontend.com/siteminderagent/forms/...
2. User successfully authenticates and is forwarded ... but we receive a 404 error instead of the requested resource.
3. The url displays frontend.com/target
4. WebAgentTrace log shows that the flow breaks when trying to forward to the requested resource. But instead of frontend.com/target, it tries to forward to frontend.com/target/target/.
Any idea why it is trying to add the /target/ twice? I've tried to play with the trailing slashes in the proxy rules as well as $0 and $1.
I'm assuming you are accessing http://frontend.com/target on your browser.
Since we have defined $0 in proxyrules http://backend.com/target$0 therefore the end result is frontend.com/target/target/
If we are accessing http://frontend.com/target on the browser, then on ProxyRules only keep http://backend.com$0.
When forwarding or redirecting a request, CA Access Gateway uses a system for maintaining some part or all of the URI specified by a user. The URI points to a resource that lies on a destination server and must be interpreted to fulfill a request.
Either of the following may be appended to the URL specified in a forward or redirect destination:
$1Indicates that everything to the right of the matching text is appended to the forwarded or redirected request. Use it in nete:case elements where the parent nete:cond element specifies a URI substring match using the begins with comparison.For example, consider a proxy rules configuration file that has a nete:cond element of:
<nete:cond type="uri" criteria="beginswith">
Assume this condition is the child of a condition that is evaluating URIs for a hostname of www.company.com and a nete:case element of:
<nete:case value="/hr"><nete:forward>http://hr.company.com$1</nete:forward> </nete:case>
If a user requests:
The request is forwarded to:
Thank you Hubert for helping me understand how the proxyrules work with the $0 and $1.
I was able to resolve the double /target issue by keeping the base server names in the proxyrules.xml and requesting frontend.com/target in the browser. So /target gets appended to backend.com.