Forum Discussion
Richard_Milner-
May 08, 2012Nimbostratus
mod_rewrite to iRule conversion question from a newcomer
Hi Folks,
I'm fairly new to the BIGIP devices, though I've used competitors products before so I'm not starting from scratch. I have a mod_rewrite rule that I'm trying to migrate f...
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"
}
}
}
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