Forum Discussion
I can't get this Irule to work
Hi Paul,
Just changing the value in the HTTP::header on the request will not affect the routing of the request. I can see what you are trying to do, so I would suggest putting the server that you are trying to direct traffic to in a pool then making your URI modifications if necessary and then directing traffic to the pool (the LTM will take care of the rest).
Something like this:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "dcc.dorsetforyou.com" } {
switch -glob [string tolower [HTTP::uri]] {
"/importer" { pool vmcrglassfish.pool }
"travelclaims" {
HTTP::uri "/SAPTECS/"
pool vmcrglassfish.pool
}
"/" {
HTTP::redirect "https://dorsetforyou.com"
}
}
}
}
NOTE: You do not have to use switch statements (I like them because they are easier to follow and easier to add to if you know you are going to be doing a lot of manipulation on a given Virtual Server).
Hope this helps.
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