Proper order for URL Match parameters - Printable Version +- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums) +-- Forum: Forum Related (/forumdisplay.php?fid=37) +--- Forum: Proxomitron Program (/forumdisplay.php?fid=4) +--- Thread: Proper order for URL Match parameters (/showthread.php?tid=2074) |
Proper order for URL Match parameters - zoltan - Jan. 17, 2013 08:21 PM I'm getting some strange behavior from the filter below. The idea is that it should only filter s1.zetaboards.com, but it's affecting others - and it depends on the order of the elements in the URL Match box (the only difference between the two below). Name = "zeta header logo 9-29-12" Active = TRUE URL = "s1.zetaboards.com/ $TYPE(htm)|$TYPE(css)" Limit = 190 Match = "logo* clear:both" Name = "zeta header logo 9-29-12" Active = TRUE URL = "$TYPE(htm)|$TYPE(css) s1.zetaboards.com/" Limit = 190 Match = "logo* clear:both" The first filter above affects http://maps.google.com/ (screws up street view) The second filter affects http://sportsillustrated.cnn.com/college-football/ (alters page layout) But Google Maps works fine with the 2nd one, and CNNSI works fine with the first one. Without the $TYPE restrictions, it doesn't affect either site. It seems impossible, even if I'm getting the order wrong in the URL Match. Maybe a glitch apart from Proxomitron. Either way, I'd like to know the proper order for elements in the box. For years I've been using the 2nd method and have just assumed it works, but maybe not. Isn't it ideal to have a $TYPE restriction so that the filter's scope is narrowed as much as possible? RE: Proper order for URL Match parameters - whenever - Jan. 18, 2013 03:12 AM What if you use ($TYPE(htm)|$TYPE(css))? RE: Proper order for URL Match parameters - zoltan - Jan. 19, 2013 12:37 AM Thanks. I tried it with the $TYPE restriction before and after the URL and it seems to work both ways as long as it's enclosed in (). So am I to conclude that order doesn't matter? I wonder about the URL rules also because I'm running into similar issues with another filter. Code: Name = "font family new 1" When the above filter is applied to this css: http://graphics8.nytimes.com/css/0.1/screen/common/forms.css it's triggered no matter whether the () encloses the $TYPE restrictions or not. But if I add ^www.cnn.com to the end of it, the filter no longer works when the $TYPEs are enclosed with (). I don't see why asking it not to filter a certain site would disable it on others. RE: Proper order for URL Match parameters - JJoe - Jan. 19, 2013 05:44 PM I think you need to add some parentheses. Try ($TYPE(htm)|$TYPE(css)|$TYPE(js))(^www.cnn.com) Says: htm OR css OR js, for all sites NOT www.cnn.com*. Quote:s1.zetaboards.com/ $TYPE(htm)|$TYPE(css) Says: for s1.zetaboards.com/ the htm OR all site's css. Of course, "all site's css" includes the css at s1.zetaboards.com/ Quote:$TYPE(htm)|$TYPE(css) s1.zetaboards.com/ Says: all site's htm OR the css at s1.zetaboards.com/. Quote:So am I to conclude that order doesn't matter? No. HTH RE: Proper order for URL Match parameters - zoltan - Jan. 20, 2013 01:55 AM Thanks. Now the behavior makes sense. It's really not a matter of "order" in the way I was thinking, but more that the OR character takes precedence as a separator forcing all the elements on the other side to be considered together. For some reason I had seen the $TYPEs as a unit separated from the URL. Nice to know this though. I have a lot of filters that need to be corrected. |