Forum Discussion
Shawn_Salyers_8
Apr 27, 2011Nimbostratus
URI Redirect with 301
Hello and thank you for the help....
I have a need to take the incoming request and replace portions of the URI and redirect to ta different pool, which is currently working with the follow...
Joel_Moses
Apr 28, 2011Nimbostratus
Hoolio sweeps in for the win. üòÜ
Here's an example of what he's talking about:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] eq "devurl.mycompany.com" } {
switch -glob [string tolower [HTTP::uri]] {
"/landing/sections/innovation/article/*" {
HTTP::respond 301 Location [string map {/landing/sections/innovation/article /articles} [HTTP::path]][HTTP::query]
}
"/landing/sections/lifestyle/article/*" {
HTTP::respond 301 Location [string map {/landing/sections/lifestyle/article /articles} [HTTP::path]][HTTP::query]
}
}
pool POOL-X001
}
}
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