Forum Discussion
gbunting
Nimbostratus
Mar 19, 2009How to clean up multiple if/else redirects?
I have a current iRule that works. It will redirect from www.domainname.com.au to www.domainname.com/au for multiple international domains. The problem is I currently have 7 if/else statements for 7...
Arie
Altostratus
Mar 19, 2009Have you considered using "switch" instead of if-then?
You could use a Data List, but you'd have to apply a few tricks to get the functionality of data pairs. For maximum performance, F5's recommendation is to use a Data List when you have more than 100 entries.
By the way, it looks like your iRule will not work for users who don't use "www." in the address.
Also, you're using 302 redirects, which is a temporary redirect. I'd recommend using a 301 (permanent redirect) - you can use HTTP::respond to achieve this.
Hope this helps.
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