Forum Discussion
Chuck_13207
Nimbostratus
Aug 10, 2012Problem figuring out how to rewite what is sent to pool
I have a link that I want to be minus a directory when it is sent to the pool.n/tr1/W.aspx?L=Nb8PMkMI need to remove the dir /tr1/ when it gets sent back to the pool./W.aspx?L=Nb8PMkMI am sorry, i am new to TCL scripting and iRules so I need some helpThanks
The issue is this:
The user clicks on a link like this:
https://fqd
5 Replies
Sort By
- Brian_69413
Nimbostratus
I was thinking about something like this, but it is for the simplest case and is not tested:when HTTP_REQUEST { set pathvar [HTTP::path] string map {"/tr1" ""} $pathvar HTTP::path $pathvar }
- Chuck_13207
Nimbostratus
Sorry, I have been out on vacation for the weekend. Thanks for responding. - Brian_69413
Nimbostratus
OK, how about this:when HTTP_REQUEST { set pathvar [HTTP::path] if { [HTTP::path] contains "/tr1" }{ string map {"/tr1" ""} $pathvar HTTP::path $pathvar pool pool_tr1 } elseif { [HTTP::path] contains "/tr2" }{ string map {"/tr2" ""} $pathvar HTTP::path $pathvar pool pool_tr2 } }
- Chuck_13207
Nimbostratus
Can I send you the irule we currently have so you can see what is currently being used and maybe you can see how this needs to work? - hoolio
Cirrostratus
Hi Chuck,
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