Forum Discussion
Earnest_Dyke_10
Nimbostratus
Feb 16, 2006Simple IRule apparently not working
Greegings all.
We have the IRule below and when we install it and attempt to execute our web app, we see not messages in the log. We do not see any syntax errors messages either. Any ideas why we ...
Otto_Kretzer_68
Nimbostratus
Feb 16, 2006Colin - Yes its the ltm log file im looking at, when we use the following code i get entries int he log file:
when RULE_INIT {
log local0. "Earnies rule is being initialized"
}
when HTTP_RESPONSE {
If this is not a browser redirect, igonore it
if {[HTTP::status] starts_with "3"} {
set location [HTTP::header "Location"]
if {$location == ""} {
return
}
} else {
return
}
log local0. "Checking location: $location"
Look of each entry in retidrect_rewrite in the redirect location
set badurl [list "http://ww1:80" "https://ww1:80"]
foreach x $badurl {
if {$location starts_with $x} {
set len [string length $x]
Get all of the URI after the port number
set resource [substr $location $len]
set outlocation "https://ww1$resource"
log local0. "Rewriting $location to $outlocation"
HTTP::header replace "Location" $outlocation
break;
}
}
}
But soon as we add additional items to this code like what Earnie posted above it then sends nothing to the logs (ltm).
And NO, one connect profile is not enabled , it is set to NONE.
thanks
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