Forum Discussion
sosomiqautadze_
Nimbostratus
Sep 12, 2018Irule Redirection Problems
on one virtual server need publish 3 sites;
site A ( this site is on IIS and i need redirect request to this site subdirectory);
site B ;
...
Sep 13, 2018
Hi,
I would recommend first combining all of the logic into one event. Your example switch statement used the "string tolower" function but the matching values were capitialized. You may also consider adding a default section if you have some other condition to match.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"sitea.com" {
if { [HTTP::uri] ends_with "/" } {
HTTP::redirect "http://192.168.0.0/subdirectory"
}
}
"siteb.com" { pool B }
"sitec.com" { pool C }
}
}
If you are testing an iRule but it won't load, check the /var/log/ltm log file to see if any runtime error messages are logged.
Hope this helps.
-Josh
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects