Jump to content

Block on part of a site


Recommended Posts

Guest theeldergeek
Posted

Is it possible to block only part of a site using Smoothwall?

 

Let's say, for example, I have a web site http://www.thissite.com that I generally want open for access, but a particular part of the site, http://www.thissite.com/adultsonly, needs to be blocked.

 

The actual web site in question is gumtree.com as it happens, and i want to block access to the "casual encounters" section as it really isn't suitable for a learning environment!

 

Smoothwall techs'port are short staffed today, so I can't get an immediate answer from them, but I am being chased down by a tutor desperate to get this site unblocked, so if anyone can help....

 

:)

Posted

I take it that the issue is that you need to allow gumtree.com (as it's blocked on a list) then block a part of it? I *think* you need to do this with a URL regular expression. nile_c will be able to back my guess up with solid actual knowledge, but...

 

Add in your custom allow the following under the URL Regular Expressions box:

 

(?:[^/]*\.)thissite.com(?!(/adultsonly))(/?)(.*)

 

Replacing thissite.com and adultsonly appropriately. This will then allow any URL that matches thissite.com but not thissite.com/adultsonly. I think. You may want to put this in a new filter with a new custom category then set the action to "skip url blocking" so that it still analyses the phrase content on the pages that you are allowing access to.

 

Best wait for Nile to confirm if you can wait 'til the morning.

 

Thanks!

 

 

Rob.

Posted

Yes, you would need to go with what Rob said.

 

gumtree.com will be blocked by some existing category. You then need to use a regex URL which allows all of Gumtree, save for those parts you previously mentioned.

Now Gumtree has a strange site structure which doesn't make this straightforward, but lets take Southampton as an example. We would like to block:

 

Southampton Classifieds Southampton Free Classifieds

and also (linked-to from the above)

htxp://southampton.gumtree.com/southampton/casual-sex_1736_1.html

htxp://southampton.gumtree.com/southampton/8954_1.html

htxp://southampton.gumtree.com/southampton/8955_1.html

htxp://southampton.gumtree.com/southampton/8956_1.html

htxp://southampton.gumtree.com/southampton/8957_1.html

 

So the regex URL for your custom allow list would be:

 

southampton.gumtree.com(?!(/casual_relationships\.html|/southampton/casual-sex_1736_1\.html|/southampton/8954_1\.html|/southampton/8955_1\.html|/southampton/8956_1\.html|/southampton/8957_1\.html))(/?)(.*)

 

You would need to change southampton for 'yourgumtreetown' and change the numbers in the links as appropriate.

We can lose some of the verbosity from the above example at the expense of clarity, perhaps. ;)

 

southampton.gumtree.com(?!(/casual_relationships\.html|/southampton/(casual-sex_1736_1\.html|895[4-7]_1\.html)))(/?)(.*)

 

HTH

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...