Forum Discussion
gdoyle
Cirrostratus
Oct 28, 2018Need to use last 2 of domain name as URI Variable.
So I have a customer that has 15 or so different state based domains (think something like "mydomainFL.com", "mydomainTN.com", etc...). They have a requirement that incorporates the last two or three...
gdoyle
Cirrostratus
Oct 28, 2018I think I figured out the answer to this. I can set a variable to be the length of the URL up to where I want it to define, then end it 4 before the end of the URL... So even if it is "mydomainCRAZY.com" I would do something like:
set state [string range [HTTP::host] 8 end-4]
That will define "CRAZY" as the ${state} variable, and I can insert that into the URI.
Does that sound right?
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