Brad_146558
Mar 26, 2015Nimbostratus
iRule Question
Hi everyone, this is my first time using Data Group lists and I'm having some trouble with the below iRule. Does anyone have any suggestions on what I might be doing wrong?
Also a summary as to what the iRule is doing. Basically if you are trying to go a URI other than one on the "approved" data group list, you get redirected back to the root level of the site.
when HTTP_REQUEST {
if { [[HTTP::uri] starts_with a_string] } {
pool some_pool
}
else { HTTP::redirect "https://somedomain.com/" }
}
This should do the trick. Just make sure your DG is a string list and your /URIs go in the string field.
when HTTP_REQUEST { if { [class match [HTTP::uri] starts_with "/Common/"] } { pool some_pool } else { HTTP::redirect "https://somedomain.com/" } }