Forum Discussion

yogipd's avatar
Icon for Nimbostratus rankNimbostratus
May 30, 2023

F5 URL to Different URL irule

There is an appplication changing it's url to
the default page of the application is<PATH> and it needs to be pointed to the new url https://xyz/<PATH><PATH> -> https://xyz/<PATH>

For the same application i am also curious if we can re-direct the following SPECIFIC URL as well: ->

I'm not sure if we need to do it in 2 irules

Is the below rule correct?

if { [HTTP::host] equals ""} {
if { [HTTP::path] equals "/<PATH>" } {
HTTP::redirect "<PATH>
if { [HTTP::host] equals ""} {
if { [HTTP::path] equals "/ibsc/rrr/logon/login.jsp" } {
HTTP::redirect ""


2 Replies

  • yogipd I believe the following is what you're looking for. Your first statement about changing to seems a bit off. Did you mean to say that anything going to you want to redirect to or is it only a specific path? Assuming the answer to my questions isn't yes, then the iRule below should work.


    when HTTP_REQUEST priority 500 {
        if {[HTTP::host] == ""}{
            if {[string tolower [HTTP::uri]] == "/<PATH>"} {
                HTTP::redirect "[HTTP::uri]"
            } elseif {[string tolower [HTTP::uri]] == "/ibsc/rrr/logon/login.jsp"}{
                HTTP::redirect "[HTTP::uri]"




    • Leslie_Hubertus's avatar
      Ret. Employee

      yogipd  did what Paulius post help you out, or are you still having issues? If it helped, please click the Accept as Solution button on his reply, so future users can easily find the answer they need. 🙂