Forum Discussion
DevBabu
Feb 22, 2017Cirrus
May be something like this. I have not tested it and used the regular expression that you have in question . If regular expression match redirect to some page. More on regexp can be found on.
https://devcentral.f5.com/articles/irules-101-10-regular-expressions
when HTTP_REQUEST {
set uri [HTTP::uri]
set result [regexp {[_A-Za-z0-9-\+]+(.[_A-Za-z0-9-]+)(@|\%40)[A-Za-z0-9-]+(.[A-Za-z0-9]+)(.[A-Za-z]{2,})} $uri]
if($result)
{
HTTP::redirect "http://www.example.com/newlocation.html"
}
}