Forum Discussion
Irule Suggestion
No problem, so with the first getfield command, the delimiter is ':' and thus, if a request like this came in: 'outlet.XYZ.com:80', that command would break it into two fields: 'outlet.XYZ.com' and '80'. We only want the first part so the rule doesn't get confused by the ':80' in the hostname later on. Hence we use 1 to tell the command we only want field 1, the outlet.XYZ.com one.
This of course shows I got the next use of the getfield command wrong. It should be: '[getfield $hostname "." 2]'. This splits outlet.de.XYZ.com into four parts, delimited by '.'. Those parts will be 'outlet', 'de', 'XYZ' and 'com'. The 2 (incorrectly stated as 3 above) stores field two in the variable, field two being 'de'.
Obviously with just outlet.XYZ.com this won't work, hence I've redirect to the US page if the variable doesn't match anything in the first data group.
Yes, a string type data group, the key will be en, the value en_GB etc.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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