Forum Discussion

nibinrodrigues_'s avatar
nibinrodrigues_
Icon for Nimbostratus rankNimbostratus
Nov 02, 2016

iRule for redirecting SharePoint traffic based on Path

Hi,

I need assistance in creating iRule to redirect SharePoint traffic based on path

I will have 1 Virtual server with Multiple Pool

Eg: -- should go to Pool 1 -- should go to Pool 2

I will force customer to use path "/share1 and /share2"

Thanks in advice

6 Replies

  • That's L7 content switching. A redirect happens when you issue a HTTP 3xx response to another location.

    when CLIENT_ACCEPTED {
      set poolDefault [LB::server pool]
    }
    
    when HTTP_REQUEST {
      switch -glob [string tolower [HTTP::path]] {
        "/path1*" { pool poolA }
        "/path2*" { pool poolB }
        "/pathN*" { pool poolN }
        default { pool $poolDefault }
      }
    }
    
  • That's L7 content switching. A redirect happens when you issue a HTTP 3xx response to another location.

    when CLIENT_ACCEPTED {
      set poolDefault [LB::server pool]
    }
    
    when HTTP_REQUEST {
      switch -glob [string tolower [HTTP::path]] {
        "/path1*" { pool poolA }
        "/path2*" { pool poolB }
        "/pathN*" { pool poolN }
        default { pool $poolDefault }
      }
    }