For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

bentan_12470's avatar
bentan_12470
Icon for Nimbostratus rankNimbostratus
Dec 09, 2013

iRules for URL redirect

Hi,

I have a customer would like to have the SAP portal below redirect to different servers base on the URI.

For example:

https://sapportal.test.fonterra.com/ir/date ---> Redirect to server 1

https://sapportal.test.fonterra.com/crm  Redirect to server 2

Normally, they use difference port number to redirect to difference sites. In this case, they would like to achieve Single SingOn with the same URL and the same port. Is this possible with iRules below?

when RULE_INIT {

set ::proxy_site_debug 0  

}

when HTTP_REQUEST { if {$::proxy_site_debug}{log local0. "Received request from [IP::client_addr] -> [HTTP::host][HTTP::uri]"}

 switch -glob [HTTP::uri] {
       "/ADUserFrames*" -
       "/IFrames*" -
       "/FMSBulkImport*" -
       "/FMSShortMessageService*" -
       "/Nitro%20Wizard*" -
       "/TransferNetworker*"
       {
         if {$::proxy_site_debug}{log local0. " Set pool to p_mscrm2011-PROD.PROD.fonterra.com_8080 "} 
         SSL::disable serverside
         pool p_mscrm2011-PROD.PROD.fonterra.com_8080 
         persist cookie insert "8"
       }
  default {
       if {$::proxy_site_debug}{log local0. "POOL to p_mscrm2011-PROD.PROD.fonterra.com"}
       pool p_mscrm2011-PROD.PROD.fonterra.com
       persist cookie insert "9"
       }                                    
    }
}

2 Replies

  • Your iRule suggests that the top 6 URI patterns would be sent to a port 8080 pool and offload SSL, while everything else would pass to, presumably, your regular pool, and re-encrypting to the back end. Is that your intention?