Forum Discussion
scottl_82413
Nimbostratus
Mar 09, 2010Don't redirect particular URI path
We have several old websites that we are migrating away from and a new website that everyone should start using - for this example, we'll call them www.oldsite.com, www.oldsite2.com, www.oldsite3.com ...
hoolio
Cirrostratus
Mar 09, 2010That iRule looks like it should work fine assuming you have it enabled on the oldsite VIP. Can you add logging if it's not working as you expect?
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::path]"
if {not ([HTTP::path] starts_with "/testing")}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched URI check. Redirecting."
HTTP::redirect https://www.newsite.com
}
}
Aaron
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
