Forum Discussion
Chris_Chaloux_1
Nimbostratus
Jul 29, 2009iRule w/classes corrupting class files.
Hi all!
I have an interesting problem that hopefully has a "quick" fix that I have been unable to find.
I am currently using the LTM Maintanece iRule that has been out here for quite...
Chris_Chaloux_1
Nimbostratus
Jul 29, 2009Here is the existing rule:
when HTTP_REQUEST {
set maint_prefix ""
if { [HTTP::uri] starts_with "$maint_prefix" } {
set uri [string map [list $maint_prefix ""] [HTTP::uri]]
set uri [HTTP::uri]
switch -- $uri {
"" {
log local0. "Request for $maint_prefix. Redirecting to $maint_prefix/"
HTTP::redirect "$maint_prefix/index.html"
}
"/" -
"/index.html" {
log local0. "Request for index. Responding with content: [lindex $::maint_index_html_class 0]"
HTTP::respond 200 content [lindex $::maint_index_html_class 0] "Content-Type" "text/html"
}
"/logo.jpg" {
log local0. "Request for logo.png. Responding with binary content"
HTTP::respond 200 content [b64decode [lindex $::oos_mmcom_logo_class 0]] "Content-Type" "image/png"
}
"/bluebar.jpg" {
log local0. "Request for bluebar.png. Responding with binary content"
HTTP::respond 200 content [b64decode [lindex $::oos_oursite_bluebar_class 0]] "Content-Type" "image/png"
}
"/oos_top.jpg" {
log local0. "Request for bluebar.png. Responding with binary content"
HTTP::respond 200 content [b64decode [lindex $::oos_info_logo_class 0]] "Content-Type" "image/png"
}
default {
log local0. "Unrecognized request to URI: [HTTP::uri]"
HTTP::redirect "http://www.oursite.com"
}
}
return
}
}
Thanks, Aaron!!
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