Forum Discussion

muhammed's avatar
muhammed
Icon for Nimbostratus rankNimbostratus
Dec 18, 2019

mutiple URL redirect(irule) not working

I currently have an issue as i had below mentioned irule configured and recently i have upgraded my box and after that my irule is not working.

my requirement is i have one VIP which have two applications running. and i want to redirect each application url with another FQDN.

under VIP: x.x.x.240

 

{ if request got for abc.com it should redirect to abc.com/login/yyy/ddd

and

if request got for def.com it should redirect to def.com/login/zzzz/mmm }

 

this is my requirement.

 

and what i have facing with below rule is its only responding to my second rule 1st rule not working, even if i was also.

=========================

 when HTTP_REQUEST { 

 if {([HTTP::host] eq "eem-int.abc.com") and ([HTTP::uri] eq "/")} { 

  HTTP::redirect "https://eem-int.abc.com/en-GB/app/EEM_dashboards/eem__home"

}

 if {([HTTP::host] eq "da-int.abc.com") and ([HTTP::uri] eq "/")} { 

  HTTP::redirect "https://da-int.abc.com/en-GB/app/DA_dashboards/da_home"

 } 

 }

==================================

kindly suggest.

1 Reply

  • Hello, what version are you currently using?

    If v14 or later, is it not a case to apply this new feature?

     https://clouddocs.f5.com/api/irules/HTTP__has_responded.html

     

    Let me know.

    Regards.