Forum Discussion
F5 APM redirect when the URI contains a # (hashtag) / URI fragmentation
- Jul 24, 2018
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
here is a cause and solution suggested: https://devcentral.f5.com/questions/how-to-preserve-apm-landing-uri-55123
and here: https://devcentral.f5.com/questions/redirect-after-apm-completes-to-original-uri-54753
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com