LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   404 emails for other domains (http://www.linuxquestions.org/questions/linux-server-73/404-emails-for-other-domains-557550/)

walidaly 05-29-2007 04:46 PM

404 emails for other domains
 
I setup a 404 error handler which sends mail for every 404 error but I get errors coming from other domain! why?!

acid_kewpie 05-29-2007 05:16 PM

not a clue without some useful information to go on, and a "please" or "thanks"... post your actual configuration file, provde sample emails to highlight the problems you're seeing...

walidaly 05-29-2007 07:59 PM

sounds like it's not so common...anyway
.htaccess
Code:

ErrorDocument 404 /error/trap.php?error=404
trap.php
Code:

mail($to,'404',"on http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}",'from:...');
please...thanks...got all the time in the world...

acid_kewpie 05-30-2007 02:41 AM

ok, so what domains are you getting? could be a dodgy dns setup somewhere and you're getting someone elses hits? all from a single source ip? any patterns in the domain names?

walidaly 06-01-2007 08:40 AM

nothing in related t domain names, but most of the error pages I get for sites I include on a frame

acid_kewpie 06-01-2007 09:13 AM

what do you mean "in a frame"? again.. what domain names? real ones? if you're talking about iframes and such, then that's quite possibly you declaring frame sources...

walidaly 07-21-2007 02:41 AM

yes I think $_SERVER['HTTP_HOST'] is sent to the server from the browser who might mistakenly send it to the original ip not the real owner

acid_kewpie 07-21-2007 03:08 AM

i could only guess that someone out there has hardcoded an incorrect IP address or something.

walidaly 07-21-2007 03:25 PM

you mean $_SERVER['HTTP_HOST'] doesn't change?

acid_kewpie 07-21-2007 04:07 PM

i don't mean anything like that, don't know what you really mean by that either.... if you are getting http requests against a server that doesn't contain the domain being requested, then unless you're making a dumb mistake somewhere, then i'd have to conclude that someone else has put your ip in their dns records or something.


All times are GMT -5. The time now is 11:21 PM.