Forum Discussion
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
- Kevin_Stewart
Employee
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?
- bentan_12470
Nimbostratus
Yes, thats my intention.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com