setting up apache to return a single file for all requests?

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
I want to set up a server that ALWAYS sends a 1 pixel by 1 pixel transparent GIF back. Why? so that I dont get a banner-sized box with a red X and "Click Here!" when I put m.doubleclick.net in my hosts file with 127.0.0.1. Having a fake director (viewad) that does that would work just as well. Can it be done?

Also, does the windows hosts file allow you to specify a differnet port so I can leave my real server up, along with the fake one?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You can setup error handlers so setup the 404 one to hand out that page.

hosts files do name->ip mappings, not port.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
good idea.. i can create a viewad directory and drop in a nice htaccess. maybe have it run a perl script that does something fun in the background :D

edit: hehe, now I can't tell where banners were :) woohoo!

too bad you can't change the port via hosts, cause that would let me do some interesting things ;)

edit2: for now, if you set m.doubleclick.net to the IP of c2h5oh.res.cmu.edu (128.2.166.196) some doubleclick banners will disappear. feel free to direct other ad sites there ;)