Hello everybody,
I read an email on the web that sent by Joe Cooper on January 16th, 2001
about Inline content modification. I encounter a same problem and I thought
you could help me.
I intend on modifying the content of the web sites arriving at my Squid
proxy. I want to replace the advertizing banners with images that I keep in
a database. The goal is to write a redirector, which can modify the web
sites’ content (replace the image and the hyperlink as well) and return the
modified file from my hard disk, pointing a url in my apache server.
As it was expected, the relative paths used in the original content were
preserved in the modified file and the client then asked for the files from
my apache server. I think that this is a problem with the headers. What I
want to achieve is to tell in some way the squid to search the asked files
back in the original server.
I want to find a solution that doesn’t force me modify the code of squid. I
want to limit myself in writing a good redirector in perl that does string
matching of the fetched content, altering the img tags and the hyperlinks
behind them. I just don’t know what to do with the relative paths. I mention
that I parse the HTML content with Perl’s library HTML::TokeParser.
If you have any ideas about how I can solve the described problem, please
let me know.
Thanks!
Received on Mon Mar 07 2005 - 05:50:23 MST
This archive was generated by hypermail pre-2.1.9 : Fri Apr 01 2005 - 12:00:01 MST