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) matches_regex "[Ww][Ee][Bb][Aa][Pp][Pp]") {
redirect to "https://%h/%u"
}
else {
use pool WebApp-50
}
and now we are upgrading to version 9 and compatable iRule for version 9 is COMPILING but NOT FUNCTIONING ...
here is the script...
when HTTP_REQUEST {
if { [string tolower [getfield [HTTP::uri] '/' 2]] == "webapp" } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} else {
pool POOL_HTTP_Vlan70
}
}
could you please tell me WHY?
thanks alot
Mojdeh
51 Replies
Sort By
- Colin_Walker_12Historic F5 AccountSo given this rule:
when HTTP_REQUEST { set uri [string tolower [HTTP::uri]] if { ($uri starts_with "/webnav") or ($uri starts_with "/webapp") } { log local0. "URI matches, redirecting to HTTPS" HTTP::redirect "https://[HTTP::host][HTTP::uri]" } else { log local0. "No match, forwarding to the pool" pool POOL_HTTP_Vlan70 } }
- Mojdeh_Koushki_
Nimbostratus
well ... i am running this which looks like the script you send it to me .... - Mojdeh_Koushki_
Nimbostratus
i will apply your suggestion with debug lines and test it and will post the resault on the log here ... - Colin_Walker_12Historic F5 AccountIf you're not using exactly the rule that I sent you, I have no way of knowing what is actually occuring in the rule, since it may be different.
- Mojdeh_Koushki_
Nimbostratus
sure ... i just apply your script .... - Mojdeh_Koushki_
Nimbostratus
Colin ... i have a question - Colin_Walker_12Historic F5 AccountSo what were the results when you tested the rule I posted?
- Mojdeh_Koushki_
Nimbostratus
Coline - unRuleY_95363Historic F5 AccountI don't think the problem is with your iRule. It is probably working. I think your problem is that after the browser has been redirected, you https virtual is not doing the right thing. This is probably why it appears to freeze. What happens if you type in the https url directly into the browser? Does it work as expected?
- Mojdeh_Koushki_
Nimbostratus
let me check the Colin's solution ... give me a 10 min
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