Forum Discussion
I stepped back and went at this a little different way. I created 3 datagroups and constructed my if statement to evaluate the contents of the datagroups. Now if the following paths are hit, it is properly redirected to the new URL.
http://domain.com/abc
http://domain.com/xyz/123
The NOT portion of the statement is not working yet. Any ideas?
http://domain.com/abc?x=y
DataGroups
datagroup_http_path_equals
datagroup_http_path_contains
datagroup_http_query_not_contains
iRule
if { ( [class match [string tolower [HTTP::path]] equals ${datagroup_http_path_equals}] || [class match [string tolower [HTTP::path]] contains ${datagroup_http_path_contains}] ) and not ( [class match [string tolower [HTTP::query]] contains ${datagroup_http_query_not_contains}] ) } {Redirect to new url}