Forum Discussion
nrelihan_68143
Nimbostratus
Jul 08, 2011Redirecting to regional website depending on user DNS.
Hey all, I'm quite new to F5 irules first of all.
Perhaps I'll tell you what I have working first and then explain to you what additional things I'd like to do.
What I have working...
Peter_72728
Nimbostratus
Jul 11, 2011My first response was after I looked at the syntax...now I'm looking at the logic and I'm not sure it will work.
When a request comes in that doesn't have the "/ireland" prefix, you want to redirect it. But in your sample code, you are setting the pool as well. Then, when a request comes in that already has the "/ireland" prefix, you don't set a pool.
I think you want to change it to something like this...
if {$hostname eq "www.quinn-direct.com" and not $uri starts_with "/ireland"} {
HTTP::redirect http://www.quinn-direct.com/ireland/[HTTP::uri]
}
else {
pool gpool-qdi-ie-quinn-direct.com-ie
}
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
