Marcos Mendez wrote:
Hi, I've tried this approach but it doesn't work reliably. I've tried
replacing the start or end body, html and even head tags as I
typically use a script hosted on my adserver to serve the ads. So I
simply replaced the script with your suggestion. This approach does
work for simple sites (and my script), but go to use it for eweek.com,
google.com, or yahoo.com... the ad is nowhere to be seen. Am I missing
something?
Here's my proxy.conf
<IfModule mod_proxy.c>
<IfModule mod_ssl.c>
SSLEngine on
SSLProxyEngine on
</IfModule>
ProxyRequests On
NoProxy .myadserver.com myadserver.com 172.16.1.29
<Proxy *>
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|<body?([^>]*?)>|<body$1><div
id=\"my_advert_box\"
style=\"position:absolute;top:0;right:0;z-index:1000\"><a href=\"#\"
click=\"document.getElementById('my_advert_box').style.display='none';\">[X]</a>Advert
content</div>|iq"
Order allow,deny
Allow from all
</Proxy>
ProxyVia Off
</IfModule>
When you go to the page through your proxy and look at the html source
is the div actually being inserted correctly?
I just downloaded the google front page and manually inserted my div. I
added a background color, some padding and a big red border. You can see
it here:
https://secure.grepular.com/adtest/
All I did on that page was insert the div that you can see immediately
after the body tag ends.
Looks like it displays properly to me. Although, google could
technically be doing some clever stuff with javascript to remove
unexpected html elements, but I doubt it...
Also, could you please avoid top-posting.
--
Mike Cardwell - IT Consultant and LAMP developer
Cardwell IT Ltd. (UK Reg'd Company #06920226) http://cardwellit.com/
Technical Blog: https://secure.grepular.com/blog/
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org