Forum Discussion
gaza_104946
Jul 27, 2011Nimbostratus
HTTP::path not updating within iRule
Running 10.2 HF2
I originally had a iRule that was rewriting incoming requests
if { [HTTP::path] equals "/abc" } {
log local0. "[virtual name] [IP::client_addr] detected old...
hooleylist
Jul 27, 2011Cirrostratus
Hi Gaza,
Most HTTP:: commands are cached within the same event and priority. So what you're seeing is expected. If you want to use the modified value of after changing the path with HTTP::path, you can save it to a variable:
when HTTP_REQUEST {
if { [HTTP::path] equals "/abc" } {
log local0. "[virtual name] [IP::client_addr] detected old path /abc and modified to /xyz"
set path "/xyz"
HTTP::path $path
}
switch $path {
"/abc" { pool pool_abc }
"/xyz" { pool pool_xyz }
}
}
Aaron
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