Forum Discussion
Mojdeh_Koushki_
Nimbostratus
Oct 14, 2005iRule Script in Ver 9 is not functioning
hello
here is my problem, i have a set of bigip for bunch of web farm on ver 4.5.10, which i have this iRule for it and it is functioning Very Well...
if (getfield(http_uri, '/', 2) m...
Colin_Walker_12
Oct 17, 2005Historic F5 Account
What do you mean with the pool as the last sentence? Did you modify the rule I posted? If so...please don't. I'm trying to rule out what could be going wrong. If you're modifying things that I can't see, I'm never going to be able to track down what's happening.
If you are using the most recent rule I posted, it shouldn't be possible for that loop to exist, as the rule I posted checked the TCP port the request was coming in for before performing the redirect. You said yourself that when you implemented the updated rule, the loop stopped happening, and the redirection stopped occuring.
Please stop updating things without re-posting the rule you're currently working with.
As far as I know, since you haven't updated me, I'm under the impression you are still using this rule:
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { (($uri starts_with "/webnav") or ($uri starts_with "/webapp")) and ([TCP::local_port] == 80) } {
log local0. "URI matches, and Port matches, redirecting to HTTPS"
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} else {
log local0. "No match, forwarding to the pool"
pool POOL_HTTP_Vlan70
}
}The log you included doesn't seem to reflect that, as that loop shouldn't be possible with this rule. This should provide the exact functionality you asked for. It checks the URI, and the TCP port. It redirects to https if it's not already, and passes to the normal pool if it doesn't match those requirements.
-Colin
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
