Forum Discussion
Annsar_Akhtar
Nimbostratus
Nov 14, 2016Irule to capture only part of the url and perform a redirect
Hi All
I have a requirement from our development team as we look into moving to a new url structure to accommodate new responsive pages.
The request is to redirect the url only if the url ...
Leonardo_Accors
Cirrus
Nov 14, 2016Hi Annsar, too much "]" after getfield instruction. Try this:
when HTTP_REQUEST {
set level3 [getfield [HTTP::uri] "/" 4]
if { [string tolower [HTTP::uri]] starts_with "/level1" } {
HTTP::respond 302 Location [string map -nocase {/$level3 /newlevel/$level3} [HTTP::uri]]
}
}
regards Leonardo
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