Forum Discussion

Erik_Hetenyi_36's avatar
Icon for Nimbostratus rankNimbostratus
Jul 13, 2018

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 annoyi...
  • Erik_Hetenyi_36's avatar
    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.

    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