Question Locked

squidGaurd using Regular Expression to block URLs

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi,

we want to block all access to a web site accessed with url containing index.php?q=, how can we do this?

example:

http://anywebsite.com/index.php?q=alLKJADA)*(#$#)*DF SJF)#*&%*$LFSL

thanks,
ocavid

2 replies

by apotheon

If the regular expression is all you need, try something like this:

[b]index\.php\?q=[/b]

[edit: You need to escape the period because in regular expression syntax an unescaped period means "any single character", and you need to escape the question mark because an unescaped question mark means "match the preceding character (or character class) once or zero times only".]

If you need help on the configuration (setting up a block list, et cetera), check here:

[url=http://www.squidguard.org/Doc/configure.html][b]Basic Configuration of squidGuard[/b][/url]

This discussion is closed to new replies.