Forum Discussion
heskez_36146
Nimbostratus
Nov 28, 2013Maintanance Irule two issues
Hi there,
We've build a cool maintanance Irule (With your help much appreciated)
when HTTP_REQUEST {
switch [HTTP::uri] {
"/index.css" {
HTTP::respond 200 content [ifile ...
nitass
Employee
Jan 24, 2014So I'd like in the Irule something like redirect /application/engine to root path www.x.com.
you can do but shouldn't it be easier to use switch glob-style matching similar to this?
when HTTP_REQUEST {
switch -glob [HTTP::path] {
"*/index.css" {
HTTP::respond 200 content [ifile get index.css] "Content-Type" "text/css"
}
"*/logo.gif" {
HTTP::respond 200 content [ifile get logo.gif] "Content-Type" "image/gif"
}
default {
HTTP::respond 200 content [ifile get error.html] "Content-Type" "text/html"
}
}
}
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