LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-11-2004, 09:13 PM   #1
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374

Rep: Reputation: 32
HOSTS file and error messages


i use a hosts file to block advertisments on the net. this works very well however in konqueror instead of a banner ad i recieve the following

An error occurred while loading http://pagead2.googlesyndication.com/pagead/ads?

is there a way to change this message, or in my hosts file to have it redirect to a white jpg or something?

thanks
 
Old 12-11-2004, 09:29 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
You could do something like run a local httpd server and RewriteRule ^(.*)$ to a 1x1 transparent gif or something.

As an alternative, check out the junkbuster proxy.
 
Old 12-11-2004, 11:01 PM   #3
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374

Original Poster
Rep: Reputation: 32
i have a local http server, could you give me an example of how to do this RewriteRule ^(.*)$
 
Old 12-11-2004, 11:24 PM   #4
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Yup
 
Old 12-14-2004, 03:57 AM   #5
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374

Original Poster
Rep: Reputation: 32
yeah right, thanks anyways
 
Old 12-14-2004, 08:11 AM   #6
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Ok fine ... Here's an example that won't work, but should show you enough to get you started -- You could also do this with AliasMatch or RedirectMatch:

RewriteRule ^(.*)$ /image

Hint: You'll need a vhost for this
 
Old 12-14-2004, 08:59 AM   #7
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374

Original Poster
Rep: Reputation: 32
i did a dodgy but it works none the less.

changed my 404 error page on my webserver to a transperant gif.

pretty cheap huh, lol
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirecting the kernel messages to file other than /var/log/messages jyotika_b83 Linux - General 3 04-28-2005 06:39 PM
Redirecting error messages to stderr and file in Bash lowpro2k3 Programming 1 04-14-2005 06:47 PM
convert error messages to text file creilar Linux - Newbie 1 05-26-2004 10:58 AM
syslog and firestarter - log messages to another file than messages mule Linux - Newbie 0 08-07-2003 03:35 AM
Putting error messages on the screen into a file... tarballed Linux - Newbie 3 07-01-2003 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration