1、创建iRules规则:irules_apache
在“Local Traffic→Profiles”页面点击“create”按钮:
①、Name栏填写:irules_apache(填一个英文名称)
②、Definition栏填写以下脚本,将访问的域名为“blog.s135.com”,访问的网址以“.htm”结尾,或者以“/read.php”开头的请求全部转到服务器池“pool_apache_irules”: view plaincopy to clipboardprint?
when HTTP_REQUEST {
if {[HTTP::host] equals "blog.s135.com" and [HTTP::uri] ends_with ".htm"} {
pool pool_apache_irules
}
elseif {[HTTP::host] equals "blog.s135.com" and [HTTP::uri] starts_with "/read.php"} {
pool pool_apache_irules
}
}
when HTTP_REQUEST { if {[HTTP::host] equals "blog.s135.com" and [HTTP::uri] ends_with ".htm"} { pool pool_apache_irules } elseif {[HTTP::host] equals "blog.s135.com" and [HTTP::uri] starts_with "/read.php"} { pool pool_apache_irules }}