Re: 404 redirects "stolen" by provider

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 9, 2010 at 3:29 PM, Merlin Morgenstern <merlin_x@xxxxxxxxxxx> wrote:
> Hello,
>
> I am running a website under apache and php where I do redirects on 404
> errors:
>
> apache conf:
> ErrorDocument 404 /subapp_members/search_user.php
>
> This is done to allow ULRs with usernames like this:
> www.server.com/username
>
> The PHP script search_user.php looks in a db if the user name is existent
> and if yes shows his member page. If the name is not existent it displays an
> internal 404 message.
>
> This worked perfectly for recent years until now. Some users complain that
> they do see advertisement instead of the page. A research showed that they
> are using a provider called "unitymedia". As soon as a site has a page not
> found error it redirects them to their own advertisement page. This is true
> for all pages on the net. e.b. ebay.com/testing shows their advertisement.
>
> Has somebody an idea on how to fix that from my site?
>
> Thank you for any help,
>
> Merlin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Is there anything in the request headers from these users that the
server could use to identify that they came from this provider? If so,
you could serve the 404 response with a 200 header. Effectively,
instead of having the server reply "No such page" to those request, it
is saying "Yes, there is no such page." It's a bit broken, IMO, but
you used to have to do something similar for WebTV. Their browser
would simply show a 404 dialog instead of the custom error page.

If you are feeling particularly spiteful toward "unitymedia," you
could even take the opportunity to add a message to your not-found
page for those people recommending a different provider that doesn't
hijack requests for missing content to another site.  :-)

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux