Forum Discussion

F5_Freek_243545's avatar
F5_Freek_243545
Icon for Nimbostratus rankNimbostratus
Jun 27, 2017

URL redirection question

Hi all,

I have arequirement to redirect

https://mybook.honeybee.com//login
to
https://myaccount.honeybee.com/login
. I am trying below irule but unfortunately it is not working. I think the function is creating the problem. Anyone faced same kind of issue before?

when HTTP_REQUEST {
    if { ([HTTP::host] equals "mybook.honeybee.com") and ([HTTP::uri] starts_with "//login")} {
        HTTP::respond 301 "Location" "https://myaccount.honeybee.com/login"
        return
    } 
}

1 Reply

  • P_K's avatar
    P_K
    Icon for Altostratus rankAltostratus

    Hashtags are a fragment of the query portion of the URI.

     

    All browsers only use the locally to only display a section of the data queried with in the page. This means browsers will drop everything after the hashtag when they submit this information to the server and everything after the is not sent to the server, in this case F5.

     

    Try avoiding use of in your uri's.