Forum Discussion
fletcher_61042
Nimbostratus
Aug 17, 2007need a simple rule
I have never worked on big ip b4 and I am not able to write scripts so good. I got tossed into managing the BIG ips here and i am looking forward to the challenge.
I need a very simple rule to redirect traffic from one website to another.
Is this how I should do it?
when HTTP_REQUEST {
if { [HTTP::host] equals "www.testa.com" } {
use pool testa
}
else {
HTTP::redirect "http://testb.com[HTTP::uri]"
}
}
Thanks for your help and I am sure you will see me here often.
- Deb_Allen_18Historic F5 AccountLooks good, although you might want to make your comparison case-insensitive:
when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals www.testa.com} { use pool testa } else { HTTP::redirect http://testb.com[HTTP::uri] } }
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