Forum Discussion
aschi
Nimbostratus
Mar 13, 2013Just Part of the url tolower
Hi
I searched the web and forum on ho to change some parts ot the url but wasn't successfull.
I need a iRule that just changes the bold part in the following examples.
www.domain.ch/URI1/(S(o5f...
What_Lies_Bene1
Cirrostratus
Mar 13, 2013I've not been able to test it but this might work (of course, remove the logging once it does work);
Find the first element of the URI and lower it
set stringtolower [string tolower [findstr [HTTP::uri] "/" "0" "/"]]
log local0. "Lowered part of URI is: $stringtolower"
Extract the rest of the URI that we don't want to lower
set restofuri [findstr [HTTP::uri] $stringtolower "1"]
log local0. "Remaining URI is $restofuri"
Rebuild the URI and modify it before sending to the server
HTTP::uri /$stringtolower/$restofuri
log local0. "Rebuilt URI is /$stringtolower/$restofuri"
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