irule not functioning
I am using below irule for switching connection between pools depending on request. Its not working as needed. Need help.
when HTTP_REQUEST { set low_hostname [string tolower [HTTP::host]] set low_uri [string tolower [HTTP::uri]] if { $low_hostname contains "topssit" } then { pool topssit-http } elseif { ( $low_hostname equals "topsuat" ) and ( $low_uri starts_with "/socket.io" ) } then { pool topsuat-socket-pool } elseif { ( $low_hostname contains "topsstg" ) and ( $low_uri starts_with "/socket.io" ) } then { pool topsstg-socket-pool } elseif { ( $low_hostname equals "topssit" ) and ( $low_uri starts_with "/socket.io" ) } then { pool topssit-socket-pool } elseif { ( $low_hostname equals "topsstrg" ) and ( $low_uri starts_with "/socket.io" ) } then { pool topstrg-socket-pool } elseif { $low_hostname contains "topsstg" } then { pool topsstg-pool } elseif { $low_hostname contains "topstrg" } then { pool topstrg-pool } elseif { $low_hostname contains "topsfat" } then { pool topsfat-prod-pool } }
Thanks in advance..