F5 APM redirect when the URI contains a # (hashtag) / URI fragmentation
Hi All,
I'm looking for some ideas or help on an issue with our setup. We are trying to enable the F5 APM module for a webapp and we are pretty much configured and setup except one little annoying issue.
If the URI looks like:
What happens in in almost every scenario is when a user is clicking on a hyperlink which has a querystring in it will be redirected to the homepage instead of the specific object or page he originally wanted to go.
Any help would be appreciated how to force the browser to send the full URI and store in the landinguri variable in the APM module.
Thanks!
Hi All,
I thought I would share my solution to this problem. First iRule to capture the initial request without an authenticated session. This will throw back a simple javascript to the client and encode the URI which will replace the to %23 and will submit it again.
if { ( [HTTP::uri] equals "ENTRYPOINT" ) and ( ! [ ACCESS::session exists -state_allow -sid [HTTP::cookie MRHSession] ] ) } { Respond with the 200 HTTP::respond 200 content " " }
The second part is to capture this URI and decode it back than update the landinguri in the access session.
when ACCESS_SESSION_STARTED { if { [HTTP::uri] contains "%23" } { set tmpURI [HTTP::uri] ACCESS::session data set session.server.landinguri [URI::decode $tmpURI] } }
This solution seems to work for us. But please let me know if anybody has any better idea. Thanks