Need an Expression for blocking webpage access.

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
Nightlord
Forum Newbie
Posts: 1
Joined: Mon May 14, 2007 2:51 pm

Need an Expression for blocking webpage access.

Post by Nightlord »

I'm using a program called URLfilter (works with IPCop, if you're familiar) and it allows you to block access to websites. You can block whole domains and specific URLs, and you can also use Regular Expressions.
Here's what I need.
I need an expression for pointing out/blocking specific folders. We'll use /ADS as the example. I need the expressions to catch:

1. msn.com/ads
2. msn.com/Ads
3. CNN.COM/ADS
4. sponsor.microsoft.com/ads

The idea is that regardless of the Domain, it would catch (and the program will now block) any code coming from a web folder called /ADS
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Don't know if this will work for you or not..

Code: Select all

#/ads/{0,1}#i
Post Reply