Forum Discussion

chocokoala's avatar
Icon for Altostratus rankAltostratus
May 31, 2022

iRule Recommendation


I need help for an irule to be used for this scenario (this is a outlook/owa/autodiscover setup)

we currently have a setup/irule that if the client type it goes to the owa pool, if it goes to autodiscover pool 

my question now, they want to change the domain that if the user types it redirect to, if user type redirect to same with /autodiscover

we used the iapp for exchange setup btw,, for this redirection is there a way we can do this? or is this simple redirection irule that redirect to ?

3 Replies

  • A simple redirection irule should do the redirection :

    when HTTP_REQUEST { 
      if { [HTTP::host] eq "" } { 
        HTTP::redirect "[HTTP::uri]"

     Then you old irule should take care of pool selection :

    when HTTP_REQUEST {
      if { [HTTP::uri] starts_with "/owa" } {
        pool OWA_pool
      elseif { [HTTP::uri] starts_with "/example" } {
        pool Example_pool

    If irules are associated to the same VS, yous should make sure the redirect execute first, you have a number of options for that including checking for the hostname before pool selection, or adding priorities to your events

    • chocokoala's avatar
      Icon for Altostratus rankAltostratus

      Hi again,

      For the 2nd line:
      if { [HTTP::host] eq "" }

      don't i need to add [HTTP::uri] ?

      sorry im just newbie on f5 irules