Aaron_S_01_1634
Feb 22, 2017Nimbostratus
iRule to redirect to home page if URI contains email address
Hey all,
We've gotten a request for an iRule on a system living on a legacy 10.x system (being decommed soon) that redirects to the home page if the URI contains an email address. If I were doing this in Apache, I'd do something like:
RewriteCond %{QUERY_STRING} "[_A-Za-z0-9-\+]+(.[_A-Za-z0-9-]+)(@|\%40)[A-Za-z0-9-]+(.[A-Za-z0-9]+)(.[A-Za-z]{2,})"
RewriteRule ^.*?.(html)$ / [F]
(Haven't tested that, just an example of where I'd start)
I see that regex's in iRules are frowned upon, but not sure how else to handle this. Any thoughts or examples would be appreciated.