Forum Discussion
Bruce_Bronczyk
Altostratus
Jan 27, 2006Undefined procedure error
When trying to add this new iRule to our virtual server I am getting this error:
01070151:3: Rule [pkRouteImageRequests] error:
line 1: [undefined procedure: rule] [rule pkRouteImageRequests
{
when HTTP_REQUEST
{
if { [regexp {.jpg$} [HTTP::uri]] || [regexp {.gif$} [HTTP::uri]] }
use pool parking_image_pool
}
}]
Anyone know what it means? The text for this rule is below, I can't find anything wrong with it.
rule pkRouteImageRequests
{
when HTTP_REQUEST
{
if { [regexp {.jpg$} [HTTP::uri]] || [regexp {.gif$} [HTTP::uri]] }
use pool parking_image_pool
}
}
Thanks!
- iRules don't contain the surrounding "rule rule_name { }" section. That is how it is serialized to the configuration file. If you are adding it from the GUI, only use the event sections, the name is defined in a text box in the GUI. Also, you are missing an opening brace for your if statement.
when HTTP_REQUEST { if { [regexp {.jpg$} [HTTP::uri]] || [regexp {.gif$} [HTTP::uri]] } { use pool parking_image_pool } }
when HTTP_REQUEST { if { ([HTTP::uri] ends_with ".jpg") || ([HTTP::uri] ends_with ".gif") } { pool parking_image_pool } }
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