Forum Discussion
Kenny_Van_73892
Nimbostratus
Apr 23, 2008string tolower confirm
I got an irule but need someone to confirm this if [string tolower] only work on HTTP::host, not HTTP::uri
HTTP::redirect https://[string tolower [HTTP::host]][HTTP::uri]
I just want to convert any case to lower case within url.
Thanks.
6 Replies
- Nicolas_Menant
Employee
hi,
string command is a TCL command. You can use it with any kind of text data !
So you should be able to do this:[string tolower [HTTP::host][HTTP::uri]] If it doesn't work try this: set url [HTTP::host][HTTP::uri] HTTP::redirect https://[string tolower $url] - Kenny_Van_73892
Nimbostratus
but I just want to convert to lower case with the HTTP::host only, not HTTP::uri and wonder if the above part of my irule work that way or not. - Kenny_Van_73892
Nimbostratus
nmenant,
Thanks for your response. but in your case, then the [string tolower [HTTP::host][HTTP::uri]] will convert all url and uri to lower case. - Nicolas_Menant
Employee
Sorry for the misunderstanding.
it will work !
if you want to check do that:
log local0. "Init: [HTTP::host][HTTP::uri]"
log local0. "With lower: [string tolower [HTTP::host]][HTTP::uri]"
and check /var/log/ltm - Kenny_Van_73892
Nimbostratus
Thanks, I will find out tomorrow. - hoolio
Cirrostratus
Out of curiosity, why are you wanting to set the Host header to lower case? The Host header should be interpreted in a case insensitive manner by clients and servers.
Aaron
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
