Forum Discussion
Dec 08, 2015
HTTP redirect with different URIs
Hi,
I have a request to redirect traffic from http://www.abc.com/sites/pmo to http://www.xyz.com/is/pmo. The customer wants all deep links past pmo to work. I tried the below irule, but it is not...
Stanislas_Piro2
Cumulonimbus
Dec 09, 2015Hi,
when HTTP_REQUEST {
if { [HTTP::path] starts_with "/sites/pmo"} {
HTTP::redirect "http://www.xyz.com[string map {/sites/pmo /is/pmo} [HTTP::path]]&[HTTP::query]"
or if the path is only
HTTP::redirect "http://www.xyz.com/is/pmo&[HTTP::query]"
}
}
or if the path is /sites/pmo and not all URL starting with /sites/pmo:
when HTTP_REQUEST {
if { [HTTP::path] quals "/sites/pmo"} {
HTTP::redirect "http://www.xyz.com/is/pmo&[HTTP::query]"
}
}
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