Forum Discussion
Parveez_70209
Nimbostratus
Nov 05, 2013Irule Suggestion
Irule Suggestion : dividing the URL based on the Country-Users and based on the official Language page:
Currently for every country, they have a separate extension alongwith the official Lang...
What_Lies_Bene1
Cirrostratus
Nov 05, 2013Here's my untested attempt, using two datagroups, one that maps en:en_gb etc. and another that maps en:EMEA;
when HTTP_REQUEST {
Remove any port specification from the hostname and store the result in variable 'hostname'
set hostname [getfield [HTTP::host] ":" 1]
Extract the third element of the hostname (reading from the right) and store result in variable 'subhostname'
set subhostname [getfield $hostname "." 3]
Stop processing this rule if the variable 'subhostname' is empty
if { $subhostname equals "" } { return }
Check if the variable 'subhostname' matches our data group list, if not, stop processing this rule
if { not [class match $subhostname equals "dg_name"] } { return }
Now we're sure we have a valid value for 'subhostname' let's move on
Extract the country URI element as necessary based on the 'subhostname' variable value
set salescountry [class match -value -- $subhostname equals "dg_name"]
Extract the region URI element as necessary based on the 'subhostname' variable value
set salesregion [class match -value -- $subhostname equals "dg222_name"]
Now finally do the redirect
HTTP::redirect "[HTTP::host]/SEUILibrary/controller/e/outlet_$subhostname/XYZPortal/$salescountry/special-offers.workflow:ShowPromo?LandingPage=/All/$salesregion/Portals/Outlet"
}
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