# \#tcl

**URL:** https://community.f5.com/tag/tcl/828.md

[Latest](https://community.f5.com/latest.md) · [Categories](https://community.f5.com/categories.md) · [Tags](https://community.f5.com/tags.md)

---

## [tcl logic in SAML Attribute value field possible?](https://community.f5.com/t/tcl-logic-in-saml-attribute-value-field-possible/71158)

<div class="topic-metadata">

**Author:** [@Samuel\_Rydén](https://community.f5.com/u/Samuel_Ryd%C3%A9n)\
**Replies:** 8\
**Last updated:** [October 19, 2026, 7:09pm UTC](https://community.f5.com/t/tcl-logic-in-saml-attribute-value-field-possible/71158 "2026-10-19T19:09:16Z")

</div>

Hi. We’re running BigIP as a SAML IDP. Can I somehow issue tcl logic in a SAML attributes? I’m talking about the Access ›› Federation : SAML Identity Provider : Local IdP Services, editing an object, under SAML Attrib…

---

## [F5 HTTPS Redirect 2025](https://community.f5.com/t/f5-https-redirect-2025/76474)

<div class="topic-metadata">

**Author:** [@Tony\_Marfil](https://community.f5.com/u/Tony_Marfil)\
**Replies:** 3\
**Last updated:** [September 1, 2025, 7:57pm UTC](https://community.f5.com/t/f5-https-redirect-2025/76474 "2025-09-01T19:57:27Z")

</div>

The Problem with Legacy Redirect iRules F5’s old \_sys\_https\_redirect iRule is simple and gets the job done, but it’s starting to show its age: Always sends HTTP 302 redirects - This changes POST requests to GET, breaki…

---

## [Is it possible to use the following Irule syntac with TCL in a policy ?](https://community.f5.com/t/is-it-possible-to-use-the-following-irule-syntac-with-tcl-in-a-policy/73098)

<div class="topic-metadata">

**Author:** [@Lemaire\_Frédéri](https://community.f5.com/u/Lemaire_Fr%C3%A9d%C3%A9ri)\
**Replies:** 2\
**Last updated:** [September 19, 2023, 4:52am UTC](https://community.f5.com/t/is-it-possible-to-use-the-following-irule-syntac-with-tcl-in-a-policy/73098 "2023-09-19T04:52:29Z")

</div>

Hello, I’ve setup some code in an Irule . This concerns a code that will take the URI, within this uri, search for first directory in the path and put it tolower before sending it to the server. set uri \[HTTP::uri\] …

---

## [Local Traffic Policy for creating Logging Profile](https://community.f5.com/t/local-traffic-policy-for-creating-logging-profile/72408)

<div class="topic-metadata">

**Author:** [@ashish\_solanki](https://community.f5.com/u/ashish_solanki)\
**Replies:** 3\
**Last updated:** [May 31, 2023, 8:01am UTC](https://community.f5.com/t/local-traffic-policy-for-creating-logging-profile/72408 "2023-05-31T08:01:00Z")

</div>

Hi All, I am working on creating a logging profile for HTTP/S virtual server for which I need help in tcl format for below logging parameters like tcl:\[HTTP::host\]: Virtual server name BIGIP HOSTNAME DATE and TIME …

---

## [Issue with HTTP\_RESPONSE\_RELEASE and redirect](https://community.f5.com/t/issue-with-http-response-release-and-redirect/72107)

<div class="topic-metadata">

**Author:** [@catoverflow](https://community.f5.com/u/catoverflow)\
**Replies:** 1\
**Last updated:** [April 13, 2023, 8:27am UTC](https://community.f5.com/t/issue-with-http-response-release-and-redirect/72107 "2023-04-13T08:27:38Z")

</div>

Hi everyone, I’m pretty new to F5 and I’ve a question, regarding the processing of iRules within the Virtual servers. Basically I have an irule that I use to log the requests and send a line into a pool: timing on\<br\>\<b…

---

## [iRule to drop Public IP access to DNS Wide-ip](https://community.f5.com/t/irule-to-drop-public-ip-access-to-dns-wide-ip/69754)

<div class="topic-metadata">

**Author:** [@kridsana](https://community.f5.com/u/kridsana)\
**Replies:** 3\
**Last updated:** [May 20, 2022, 10:36am UTC](https://community.f5.com/t/irule-to-drop-public-ip-access-to-dns-wide-ip/69754 "2022-05-20T10:36:38Z")

</div>

We have wide-ip “abc01.example.com” which we want only to access from internal user (private ip) Do we have iRule to drop only public ip and allow private ip on that wide-ip? So when nslookup to “abc01.example.com” via…

---

## [iRule \[string range...\] not chunking data properly](https://community.f5.com/t/irule-string-range-not-chunking-data-properly/69704)

<div class="topic-metadata">

**Author:** [@Log4j2](https://community.f5.com/u/Log4j2)\
**Replies:** 6\
**Last updated:** [May 11, 2022, 7:04pm UTC](https://community.f5.com/t/irule-string-range-not-chunking-data-properly/69704 "2022-05-11T19:04:49Z")

</div>

I have an irule (much of which I found here) that is to gather some much needed troubleshooting data I need in regards to the headers and payload I have coming in. The payload is obvisouly too large for a single log lin…

---

## [Session Variable names with special characters](https://community.f5.com/t/session-variable-names-with-special-characters/42733)

<div class="topic-metadata">

**Author:** [@Gihad\_296649](https://community.f5.com/u/Gihad_296649)\
**Replies:** 1\
**Last updated:** [November 27, 2020, 5:28pm UTC](https://community.f5.com/t/session-variable-names-with-special-characters/42733 "2020-11-27T17:28:26Z")

</div>

Hi I am trying to access a session variable in the Policy Editor and display it in a message box but that variable name has special characters and it keeps showing the variable name instead of the value I am using …

---

## [Automated ASM Backup - working bash script now to automate or convert to iCall/tcl](https://community.f5.com/t/automated-asm-backup-working-bash-script-now-to-automate-or-convert-to-icall-tcl/50190)

<div class="topic-metadata">

**Author:** [@saidshow](https://community.f5.com/u/saidshow)\
**Replies:** 6\
**Last updated:** [February 22, 2020, 2:45pm UTC](https://community.f5.com/t/automated-asm-backup-working-bash-script-now-to-automate-or-convert-to-icall-tcl/50190 "2020-02-22T14:45:26Z")

</div>

Hi All, I have put together a BASH script that when run performs a backup of the ASM policies and copies them to a remote location. The script runs great and I have had it set as a Cron job in my lab setup to automate…

---

## [APM :: Detecting IE 11](https://community.f5.com/t/apm-detecting-ie-11/38243)

<div class="topic-metadata">

**Author:** [@Ryan\_34424](https://community.f5.com/u/Ryan_34424)\
**Replies:** 3\
**Last updated:** [April 5, 2019, 5:36pm UTC](https://community.f5.com/t/apm-detecting-ie-11/38243 "2019-04-05T17:36:34Z")

</div>

Ok I suck, I know. But why is this wrong? expr { \[string tolower \[mcget {session.user.agent}\]\] matches\_regex {trident\\/7.+rv\\:11} } It never matches… even though my UA is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; Tri…

---

## [Loading DLLs within iRules?](https://community.f5.com/t/loading-dlls-within-irules/38481)

<div class="topic-metadata">

**Author:** [@Ivan\_383532](https://community.f5.com/u/Ivan_383532)\
**Replies:** 1\
**Last updated:** [February 14, 2019, 8:15am UTC](https://community.f5.com/t/loading-dlls-within-irules/38481 "2019-02-14T08:15:31Z")

</div>

Hello, Is it possible to load DLLs/SOs within I rules using the TCL load command? Something like when HTTP\_REQUEST { load \[file join \[pwd\] mylib.DLL\] ... call some function from mylib... } If it’s possible, is the…

---

## [iRule Encode special charaters in URI String](https://community.f5.com/t/irule-encode-special-charaters-in-uri-string/51224)

<div class="topic-metadata">

**Author:** [@GBurch](https://community.f5.com/u/GBurch)\
**Replies:** 1\
**Last updated:** [December 5, 2018, 4:38pm UTC](https://community.f5.com/t/irule-encode-special-charaters-in-uri-string/51224 "2018-12-05T16:38:24Z")

</div>

I have an iRule, which is capturing the current URI, and appending it as a variable onto another URL string later on. when HTTP\_REQUEST { ... ... set host \[HTTP::host\] set uri \[HTTP::uri\] set url "…

---

## [custom clock format variable in message box](https://community.f5.com/t/custom-clock-format-variable-in-message-box/7922)

<div class="topic-metadata">

**Author:** [@wtl1\_136682](https://community.f5.com/u/wtl1_136682)\
**Replies:** 1\
**Last updated:** [March 14, 2018, 3:15pm UTC](https://community.f5.com/t/custom-clock-format-variable-in-message-box/7922 "2018-03-14T15:15:52Z")

</div>

I would like to display the av db time variable in a message box in human readable format. I was trying to create a custom variable that would format it to human readable but it doesn’t seem to work. I have found other e…

---

## [string trim generating strange results](https://community.f5.com/t/string-trim-generating-strange-results/36437)

<div class="topic-metadata">

**Author:** [@am\_gli\_287451](https://community.f5.com/u/am_gli_287451)\
**Replies:** 1\
**Last updated:** [December 11, 2017, 4:31pm UTC](https://community.f5.com/t/string-trim-generating-strange-results/36437 "2017-12-11T16:31:05Z")

</div>

Hi, I have an issue with one of my string manipulations with variables: set test \[ACCESS::session data get session.http.last.response\_cookie\] set test \[lindex \[split $test "|"\] 0\] set test \[string trim $test "Test="\] S…

---

## [Advanced Resource Assign Expression Failing](https://community.f5.com/t/advanced-resource-assign-expression-failing/42640)

<div class="topic-metadata">

**Author:** [@Kevin\_Davies](https://community.f5.com/u/Kevin_Davies)\
**Replies:** 2\
**Last updated:** [September 23, 2017, 6:07am UTC](https://community.f5.com/t/advanced-resource-assign-expression-failing/42640 "2017-09-23T06:07:02Z")

</div>

I have a logging agent right before the Advanced Resource Assign with session.custom.\* The variable i am testing against is shown. I cannot get the right information to display. I tried ends\_with “201” and tried contains…

---

## [APM custom variable to change mail domain](https://community.f5.com/t/apm-custom-variable-to-change-mail-domain/20569)

<div class="topic-metadata">

**Author:** [@Nolan\_Jensen\_23](https://community.f5.com/u/Nolan_Jensen_23)\
**Replies:** 1\
**Last updated:** [June 2, 2017, 6:36am UTC](https://community.f5.com/t/apm-custom-variable-to-change-mail-domain/20569 "2017-06-02T06:36:36Z")

</div>

Hello, I am trying to figure out the code for a custom Expression to be used in APM for a variable assign. My goal is to modify session.ad.last.attr.mail from the value that is in active directory username@test.city.stat…

---

## [Branch evaluation fails with Rule evaluation error: invalid command name "session.logon.last.username"](https://community.f5.com/t/branch-evaluation-fails-with-rule-evaluation-error-invalid-command-name-session-logon-last-username/11780)

<div class="topic-metadata">

**Author:** [@Alain\_B\_150222](https://community.f5.com/u/Alain_B_150222)\
**Replies:** 2\
**Last updated:** [May 23, 2017, 8:34am UTC](https://community.f5.com/t/branch-evaluation-fails-with-rule-evaluation-error-invalid-command-name-session-logon-last-username/11780 "2017-05-23T08:34:10Z")

</div>

Hopefully somebody is able to enlighten me, I have the code below in a branch rule expression of an AD Query element. I get an ‘Rule evaluation failed with error: invalid command name “session.logon.last.username”’ error…

---

## [calling a tcl script inside another tcl script on f5](https://community.f5.com/t/calling-a-tcl-script-inside-another-tcl-script-on-f5/13207)

<div class="topic-metadata">

**Author:** [@Ashish\_R\_G\_2512](https://community.f5.com/u/Ashish_R_G_2512)\
**Replies:** 3\
**Last updated:** [June 22, 2016, 12:35pm UTC](https://community.f5.com/t/calling-a-tcl-script-inside-another-tcl-script-on-f5/13207 "2016-06-22T12:35:29Z")

</div>

Hi, I have a TCL script which will help me create pool. Now I am creating another tcl script for VIP creation and i want to call the pool creation script inside the VIP creation scripts. is there any way to do that…

---

## [The Double Whammy of Scripting](https://community.f5.com/t/the-double-whammy-of-scripting/66954)

<div class="topic-metadata">

**Author:** [@PSilva](https://community.f5.com/u/PSilva)\
**Replies:** 0\
**Last updated:** [June 7, 2016, 5:29pm UTC](https://community.f5.com/t/the-double-whammy-of-scripting/66954 "2016-06-07T17:29:45Z")

</div>

Many of you are very familiar with iRules, our Tool Command Language (Tcl) based scripter. It’s a powerful application delivery tool to have a programmable proxy that allows you to manipulate – in real time - any network…

---

## [APM windows inspector](https://community.f5.com/t/apm-windows-inspector/7623)

<div class="topic-metadata">

**Author:** [@1tuh3\_243099](https://community.f5.com/u/1tuh3_243099)\
**Replies:** 0\
**Last updated:** [January 12, 2016, 1:54pm UTC](https://community.f5.com/t/apm-windows-inspector/7623 "2016-01-12T13:54:41Z")

</div>

I’m building a policy out in my lab with the following workflow User → APM Policy → Windows Inspector → Grab logged in user and domain → if domain is valid → queryAD for the email address → SAML insertion … So far …

---

## [TCL man pages](https://community.f5.com/t/tcl-man-pages/43486)

<div class="topic-metadata">

**Author:** [@Brad\_Parker](https://community.f5.com/u/Brad_Parker)\
**Replies:** 3\
**Last updated:** [November 1, 2015, 8:57am UTC](https://community.f5.com/t/tcl-man-pages/43486 "2015-11-01T08:57:47Z")

</div>

Anyone else noticed that wiki.tcl.tk is redirecting to www.mega-torrent.com? What’s up with that? Am I going crazy?

---

## [BIG-IP : TCL to match member of set](https://community.f5.com/t/big-ip-tcl-to-match-member-of-set/18277)

<div class="topic-metadata">

**Author:** [@BaltoStar\_12467](https://community.f5.com/u/BaltoStar_12467)\
**Replies:** 2\
**Last updated:** [October 14, 2015, 8:54pm UTC](https://community.f5.com/t/big-ip-tcl-to-match-member-of-set/18277 "2015-10-14T20:54:12Z")

</div>

F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi There must be a better way : if { ( $segments\_count == 3 ) || ( $segments\_count == 4 ) || ( $segments\_count == 5 ) } { if { \[expr {$name\_first eq "John"}\] ||…

---

## [BIG-IP : tcl boolean logic for string comparisons](https://community.f5.com/t/big-ip-tcl-boolean-logic-for-string-comparisons/18261)

<div class="topic-metadata">

**Author:** [@BaltoStar\_12467](https://community.f5.com/u/BaltoStar_12467)\
**Replies:** 1\
**Last updated:** [October 2, 2015, 9:38pm UTC](https://community.f5.com/t/big-ip-tcl-boolean-logic-for-string-comparisons/18261 "2015-10-02T21:38:23Z")

</div>

F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi What is correct syntax for boolean operations around string comparisons ? set a "a" set b "b" set result 0 if { { $a eq "a" } && { $b eq "b" } } { set resul…

---

## [BIG-IP : irule not matching uri as expected](https://community.f5.com/t/big-ip-irule-not-matching-uri-as-expected/18298)

<div class="topic-metadata">

**Author:** [@BaltoStar\_12467](https://community.f5.com/u/BaltoStar_12467)\
**Replies:** 9\
**Last updated:** [September 18, 2015, 6:48pm UTC](https://community.f5.com/t/big-ip-irule-not-matching-uri-as-expected/18298 "2015-09-18T18:48:51Z")

</div>

F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi This code is logging all requests - including those with uri “/404” : when HTTP\_REQUEST { if {\[HTTP::uri\] != "/404"} { log local0. "uri = \[HTTP::uri…

---

## [Custom branch rule expression not working as expected](https://community.f5.com/t/custom-branch-rule-expression-not-working-as-expected/5706)

<div class="topic-metadata">

**Author:** [@Carlo\_G\_214314](https://community.f5.com/u/Carlo_G_214314)\
**Replies:** 1\
**Last updated:** [August 5, 2015, 7:00pm UTC](https://community.f5.com/t/custom-branch-rule-expression-not-working-as-expected/5706 "2015-08-05T19:00:54Z")

</div>

I am trying to create a custom branch in an APM policy. I have a custom session variable that has been set in a prior “Variable Assign” step, but the policy never follows my custom branch…it always goes to fallback. T…

---

## [Trying to convert pwdLastSet to Day Month Year Time format](https://community.f5.com/t/trying-to-convert-pwdlastset-to-day-month-year-time-format/41556)

<div class="topic-metadata">

**Author:** [@ge0ff73\_32053](https://community.f5.com/u/ge0ff73_32053)\
**Replies:** 4\
**Last updated:** [April 4, 2015, 8:24pm UTC](https://community.f5.com/t/trying-to-convert-pwdlastset-to-day-month-year-time-format/41556 "2015-04-04T20:24:02Z")

</div>

I’m trying to take session.ad.last.attr.pwdLastSet and convert it to a more user-friendly readable format. I’m very weak on both Active Directory as well as Tcl. Here’s what I have so far: if { \[ACCESS::policy agen…

---

## [Using tmsh commands in tcl script  not working](https://community.f5.com/t/using-tmsh-commands-in-tcl-script-not-working/15326)

<div class="topic-metadata">

**Author:** [@bigipjr28\_13978](https://community.f5.com/u/bigipjr28_13978)\
**Replies:** 1\
**Last updated:** [March 2, 2015, 2:26pm UTC](https://community.f5.com/t/using-tmsh-commands-in-tcl-script-not-working/15326 "2015-03-02T14:26:45Z")

</div>

I have been messing around with some tcl stuff. I want to change the order of vips in a pool on the GTM. How would I inject this command into the tcl script ? Here is the cmd I want to use ultimately - tmsh::modify /g…

---

## [To Comment or Not to Comment?](https://community.f5.com/t/to-comment-or-not-to-comment/68822)

<div class="topic-metadata">

**Author:** [@JRahm](https://community.f5.com/u/JRahm)\
**Replies:** 2\
**Last updated:** [January 6, 2015, 4:53pm UTC](https://community.f5.com/t/to-comment-or-not-to-comment/68822 "2015-01-06T16:53:34Z")

</div>

Lindsay Hill wrote an article on iRules comments on his site that got me thinking about comments in general. As I prepared to just bring forth some insightful commentary on using comments in iRules, the majority of the q…

---

## [BIG-IP irule : determine page-type](https://community.f5.com/t/big-ip-irule-determine-page-type/17928)

<div class="topic-metadata">

**Author:** [@BaltoStar\_12467](https://community.f5.com/u/BaltoStar_12467)\
**Replies:** 1\
**Last updated:** [November 26, 2014, 11:10am UTC](https://community.f5.com/t/big-ip-irule-determine-page-type/17928 "2014-11-26T11:10:26Z")

</div>

F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi Request urls can be in following forms : www.gofish.com www.gofish.com/barracuda www.gofish.com/sharks/blacknose www.gofish.com/species.html www.gofish.com/ba…

---

## [Advanced iRules: An Abstract View of iRules with the Tcl Bytecode Disassembler](https://community.f5.com/t/advanced-irules-an-abstract-view-of-irules-with-the-tcl-bytecode-disassembler/67788)

<div class="topic-metadata">

**Author:** [@JRahm](https://community.f5.com/u/JRahm)\
**Replies:** 3\
**Last updated:** [October 15, 2014, 9:24am UTC](https://community.f5.com/t/advanced-irules-an-abstract-view-of-irules-with-the-tcl-bytecode-disassembler/67788 "2014-10-15T09:24:48Z")

</div>

In case you didn’t already know, I’m a child of the 70’s. As such, my formative years were in the 80’s, where the music and movies were synthesized and super cheesy. Short Circuit was one of those cheesy movies, featurin…

[Next page](https://community.f5.com/tag/tcl/828.md?match_all_tags=true&page=1&tags%5B%5D=tcl)
