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.
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.
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]
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.
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.
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
Thanks, I will find out tomorrow.
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