Forum Discussion
scot_hartman_82
Nimbostratus
Feb 26, 2009HTTP redirect based upon URL
I'm fairly new to iRules. I went through examples I've found on the forums but wanted to see if anyone has time to double check my logic/syntax...
I have two VIPs on the same IP...
hoolio
Cirrostratus
Feb 27, 2009Hi Scot,
What you're describing should work fine for the HTTP VIP. You could use a datagroup to define the host the client will request and the corresponding URL you want to redirect to. You could then use findclass (Click here) to check the requested hostname and look up the corresponding redirect. Check the wiki page for a few examples and reply back here if you have any questions.
For the HTTPS VIP, you're limited to supporting one certificate for one VIP. So if clients did make an HTTPS request using a hostname that didn't match the cert, they would get a cert mismatch error before you would be able to redirect them to a new location. You may be able to get a cert valid for all subdomains on your domain (a wildcard cert valid for *.example.com) or you could get a cert valid for multiple hostnames on different domains using subject alternate names (SANs). Try searching the forums here for SAN SSL or subject alternate name for some more information and links.
It would be more ideal to avoid clients making requests via HTTPS to different hostnames that resolve to the same IP address.
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
