Forum Discussion
kincho_51094
Nimbostratus
Jul 10, 2010how to redirect in F5 balancers
Hi guys
I need help, I am really frustrated because I had request to configure one rule as below:
Example:
These are the webserver to be balanced
https://pcname01.domain.com/...
Chris_Miller
Altostratus
Jul 12, 2010Posted By hoolio on 07/12/2010 03:58 AM
A small note:
[HTTP::host] - will return the host header value
[HTTP::host] eq "dns.domain.com" - will return 0 or 1 depending on whether the HTTP host is dns.domain.com or not
[[HTTP::host] eq "dns.domain.com"] - will try to execute 0 or 1 and return a runtime TCL error as 0 or 1 isn't a valid command
Similarly:
[HTTP::uri] - will return the URI (path plus query string)
[HTTP::uri] eq "/" - will return 0 or 1 depending on whether the HTTP URI is / or not
[[HTTP::uri] eq "/"]] - will try to execute 0 or 1 and return a runtime TCL error as 0 or 1 isn't a valid command
You could use this:
if { [string tolower [HTTP::host]] eq "dns.domain.com" and [HTTP::uri] eq "/"] } {
Or use Joe's preferred syntax:
if { [string tolower [HTTP::host]][HTTP::uri] eq "dns.domain.com/" } {
Aaron F5 needs to release a "Hoolio App" that automatically adjusts your iRule to correct syntax so you don't have to correct mine üòõ
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