Anyone have an example rule to block a specific pattern in the body of a page? I understand the possible load ramifications of doing this and we are using a regex filter to cut down on hits. Currently it would be about 5k hits per week to the rule based on our url regex filtering.
I just want to block a specific string in the first 300 bytes of the page. I have tried Body.ToString, Body.PositionOfPattern, Body.Text... Nothing seems to be working. If someone has a working copy of a rule that can do this I would really appreciate being let in on the secret.
I dont want to give the actual string here but it would be something like: <table width="300" border="1" cellpadding="3" bordercolor="#000FFF"><tr><td><div align="center">Doing this here...</div></td></tr></table></a>Message was edited by: consoul on 2/28/14 12:43:58 PM CST
Will the "Doing this here..." always be within a <div> tag?
We can use the HTML opener and target the content in the <div> only, as opposed to matching on the entire Body.Text.
Also, do you want to block the entire page if there is a match or simply remove the content inside the <div>?
I do something similar with the HTML opener when i want to remove specific content from a page, but leave the rest of the page intact.
I've attached a set of rules i use for removing certain named <div> elements from a facebook page. you might be able to do something similar.
e²Message was edited by: eelsasser -- typos on 3/1/14 12:07:16 PM EST
Thank you for the quick reply. Unfortunately I am on 126.96.36.199 and it's complaining that the rule you supplied is from 188.8.131.52.0
Do you by chance have a screenshot of your awesome sauce rule?