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
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
Hi Erik, nice solution!
I'm dealing with the same situation. Could you share the Javascript code that you used?
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