scottl_82413
Mar 09, 2010Nimbostratus
Don'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 and www.newsite.com.
I want to redirect everyone to the new website, unless they are coming in on our test URL, which would be www.oldsite.com/testing (this could have some additional text appended to the end as they move through the site)
Everything else should redirect.
This irule (and about 20 variations) seem to redirect everything:
when HTTP_REQUEST {
if {not ([HTTP::path] starts_with "/testing")}{
HTTP::redirect https://www.newsite.com
}
}
What am I doing wrong?