Forum Discussion
Joel_Moses
May 08, 2012Nimbostratus
I think this may work, if I'm understanding your use case well enough. If not, well, tweaking is how one learns! 😆
when HTTP_REQUEST {
switch -regexp -- [string tolower [HTTP::uri]] {
"^/$" -
"^/server-status$" -
"^.*\.[a-z0-9]{3,4}$" {
return
}
default {
set redirect_uri [string range [HTTP::uri] 1 end]
HTTP::respond 301 Location "/redirect.jsp?code=$redirect_uri"
}
}
}