Forum Discussion
Scott_82785
Nimbostratus
Apr 08, 2008Redirecting Multiple Domains to a .com
I'm currently trying to redirect Multiple Domains pointing to the same vip and redirecting to a .com domain name.
: if (domain(http_host,1) == "gov" or
domain(http_host,1) == "info" or
domain(http_host,1) == "net" or
domain(http_host,1) == "org" or
domain(http_host,1) =="us" ) {
redirect to http://mydomain.com
}
else {
use pool mydomain-prod
}
All the domains start with mydomain to the same vip.
2 Replies
- hoolio
Cirrostratus
My 4.x syntax is rusty, but that looks okay. Is the rule working? If not, what are the symptoms?
Also, if all requests should be made to mydomain.com, could you just redirect to http://mydomain.com if the host isn't mydomain.com?
Aaron - Scott_82785
Nimbostratus
Thanks Aaron.
N ohave not tried it yet because this is a production. Looks like we will try it on our next maint window.
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
