Post by PaTrying to enforce (not add) a prefix to all request via a proxy.
Thus I wish to direct every 5th request to prefix
webwarper.net/ww/~gz~s/
I set Proxo to add this prefix but isn't working. Furthermore
Opera name completion/prefix to google or warper seems never to
work. Suggestions?
Doing this in Proxomitron turned out to be easier
than I expected (the presumed difficulty being the
"every 5th" part). Create a new /outgoing/ header filter:
HTTP Header: URL: filter name
URL Match:
Header Value Match: $CON(1,5)
Replacement text: $RDIR(http://webwarper.net/ww/~gz~s/\u)
Note that this appends the full URL, including the "http://"-
part. If that's not what you want, you will have to tweak it
with other replacement codes, for instance:
$RDIR(http://webwarper.net/ww/~gz~s/\h\p\q\a)
or:
$RDIR(http://webwarper.net/ww/~gz~s\p\q\a)
(Note the missing slash.)
Note also that this also intercept requests for external
stylesheets, javascript, images, etc., which may not be
what you want. (I have no idea what webwarper is).
If you only want to redirect, say, HTML documents,
you could write a filter based on Content-Type. Create a
new /incoming/ header filter:
HTTP Header: Content-Type: filter name
URL Match:
Header Value Match: text/html&$CON(1,5)
Replacement text: $RDIR(http://webwarper.net/ww/~gz~s/\u)
Note that the $CON() counts /all/ connections, not only
the ones matching the Content-Type, and that the HTML
documents matching this rule may have to be transmitted
twice.
- - -
These filters have only been briefly tested. Scrutinize,
ponder, double-check, test and tweak according to need.
--n