# string tolower confirm

**URL:** <https://community.f5.com/t/string-tolower-confirm/23087>\
**Category:** Technical Forums\
**Tags:** irules, dev, devops, application-delivery\
**Created:** [April 23, 2008, 7:27pm UTC](https://community.f5.com/t/string-tolower-confirm/23087 "2008-04-23T19:27:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenny\_Van\_73892](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@Kenny\_Van\_73892](https://community.f5.com/u/Kenny_Van_73892)\
**Post date:** [April 23, 2008, 7:27pm UTC](https://community.f5.com/t/string-tolower-confirm/23087/1 "2008-04-23T19:27:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nicolas\_Menant\_1](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@Nicolas\_Menant\_1](https://community.f5.com/u/Nicolas_Menant_1)\
**Post date:** [April 23, 2008, 8:17pm UTC](https://community.f5.com/t/string-tolower-confirm/23087/2 "2008-04-23T20:17:17Z")

</div>

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:

```tcl
[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]

```

---

<div class="post-metadata">

**Author:** ![Kenny\_Van\_73892](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@Kenny\_Van\_73892](https://community.f5.com/u/Kenny_Van_73892)\
**Post date:** [April 23, 2008, 9:27pm UTC](https://community.f5.com/t/string-tolower-confirm/23087/3 "2008-04-23T21:27:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kenny\_Van\_73892](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@Kenny\_Van\_73892](https://community.f5.com/u/Kenny_Van_73892)\
**Post date:** [April 23, 2008, 9:29pm UTC](https://community.f5.com/t/string-tolower-confirm/23087/4 "2008-04-23T21:29:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nicolas\_Menant\_1](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@Nicolas\_Menant\_1](https://community.f5.com/u/Nicolas_Menant_1)\
**Post date:** [April 23, 2008, 9:29pm UTC](https://community.f5.com/t/string-tolower-confirm/23087/5 "2008-04-23T21:29:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kenny\_Van\_73892](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@Kenny\_Van\_73892](https://community.f5.com/u/Kenny_Van_73892)\
**Post date:** [April 23, 2008, 9:31pm UTC](https://community.f5.com/t/string-tolower-confirm/23087/6 "2008-04-23T21:31:48Z")

</div>

Thanks, I will find out tomorrow.

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [April 25, 2008, 7:54am UTC](https://community.f5.com/t/string-tolower-confirm/23087/7 "2008-04-25T07:54:51Z")

</div>

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
