Forum Discussion
Dan_Ecott_19303
Nimbostratus
Jan 04, 2007Help with v9 conversion of iRule
Can anyone help with this iRule conversion I need to sort out.
Here is the old V4.x rule I was using. It simply does case matching for all possible URIs.
-----------------------8<-----------------------
if (http_uri matches_regex "^/[-a-zA-Z0-9_/]{1,35}\.[a-zA-Z0-9]{1,5}$" and http_header("Host") matches_regex "^[-a-zA-Z0-9\._]{1,30}(\:[0-9]{1,5})?$") {
use pool web_seal_pool
}
else if (http_uri matches_regex "^/[-a-zA-Z0-9_/]{1,100}\.[a-zA-Z0-9]{1,5}$" and http_header("Host") matches_regex "^[-a-zA-Z0-9\._]{1,100}(\:[0-9]{1,5})?$") {
use pool web_seal_pool
-----------------------8<-----------------------
Can anyone help?
Thanks.
- hoolio
Cirrostratus
This should be equivalent for 9.x:if { [HTTP::uri] matches_regex "^/[-a-zA-Z0-9_/]{1,35}\.[a-zA-Z0-9]{1,5}$" \ && [HTTP::host] matches_regex "^[-a-zA-Z0-9\._]{1,30}(\:[0-9]{1,5})?$"}{ pool web_seal_pool } elseif { [HTTP::uri] matches_regex "^/[-a-zA-Z0-9_/]{1,100}\.[a-zA-Z0-9]{1,5}$" \ && [HTTP::host] matches_regex "^[-a-zA-Z0-9\._]{1,100}(\:[0-9]{1,5})?$" }{ pool web_seal_pool }
if { ([HTTP::uri] matches_regex "^/[-a-zA-Z0-9_/]{1,35}\.[a-zA-Z0-9]{1,5}$" \ && [HTTP::host] matches_regex "^[-a-zA-Z0-9\._]{1,30}(\:[0-9]{1,5})?$" ) or ( [HTTP::uri] matches_regex "^/[-a-zA-Z0-9_/]{1,100}\.[a-zA-Z0-9]{1,5}$" \ && [HTTP::host] matches_regex "^[-a-zA-Z0-9\._]{1,100}(\:[0-9]{1,5})?$") }{ pool web_seal_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