There are about 8 incoming URI’s which has to be modified and send to the different pool.
I have the Data-group created with the string (old uri) and value (new uri).
The irule first assigns the variable old_uri with the incoming uri.
The first IF condition checks if the old_uri equals to the string in the Data-Group.
If the incoming URI matches to the Data-group , the variable new_uri will hold the string value. if {[class match $old_uri eq DATAGROUP]} { set new_uri [class match -value $old_uri eq DATAGROUP] HTTP::uri “$new_uri” pool $Test_pool } For some reason its not working !!!
if {[class search -name DATAGROUP contains [string tolower [HTTP::path]]]} { set new_path “[class match -value [string tolower [HTTP::path]] equals DATAGROUP]” HTTP::path “$new_path” log local0. " The new HTTP Path is [HTTP::path]" pool $Test_pool return }
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::path]] contains DATAGROUP] } {
set NEW_PATH [class match -value [string tolower [HTTP::path]] equals DATAGROUP]
HTTP::path $NEW_PATH
log local0. "The new HTTP Path is [HTTP::path]"
pool $Test_pool
return
}
}