我如何匹配Squid中URL的特定部分

我想在Squid中创build一个acl,这样域中的特定位置就可以被阻塞了。

例如:

我想允许域example.com和除下面的所有页面。

example.com/home.php example.com/#!/ example.com/home.php#!/profile.php 

我想要在URL中有一个完全匹配的模式。 如果模式不匹配,则应该允许否认。

任何人都可以请build议我如何做到这一点?

温暖的问候

Supratik

我configuration的方式是这样的:我有一个阻塞的URL patters文件,在squid.conf中我有以下几行

 acl blocked url_regex "/path/to/my/file" http_access deny blocked 

就这样。 “/ path / to / my / file”看起来像这样

 porn # for every url having the string porn on it orkut.com $ for the full domain .*avg.com/.*\.bin$ # for the url with avg.com domain and asking for the file *.bin 

希望对你有帮助