Forum Discussion
Joe_Pipitone
Jun 08, 2011Nimbostratus
Rewriting only part of the URI
I have a request to rewrite only a certain part of our URI, while still passing the last part of the URI. I need to be able to catch all requests and rewrite just part of the URI. I have a ...
Joe_Pipitone
Jun 08, 2011Nimbostratus
For some reason, when I start adding on string tolower, I keep getting redirect loops. I want to be sure I catch any case in the browser and set it to lowercase - any idea what I may be missing here?
when HTTP_REQUEST {
Check if path starts with /newsletters/directory2
if { [string tolower [HTTP::path]] starts_with "/newsletters/directory2"}{
Replace /newsletters/directory2 with /newsletters/directory3 in the path
HTTP::redirect [string map {/newsletters/directory2 /newsletters/directory3} [HTTP::path]]
}
}
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