Forum Moderators: DixonJones

Message Too Old, No Replies

400 Errors

         

ahdtravel

3:03 am on Apr 7, 2009 (gmt 0)

10+ Year Member



I hve being facing this problem from quite a long time.. would like to know how do u find these 400 errors and how do u redirect these to 404 errors....
thank you.

jdMorgan

4:09 am on Apr 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since a 400 error means that the server cannot understand or handle the request because it is malformed, and since most of these malformed requests come from badly-coded site scrapers, data miners, vulnerability probers, and e-mail address harvesters, there is not much you can or should do about it.

You cannot stop these invalid requests from arriving at your server unless you have a firewall on your server and can modify its settings, and they are logged by your server only 'as a courtesy' to you. So, you can either ignore those log entries, or set up custom logging on your server (if you have the privileges to do so) to prevent requests resulting in a 400 status response from being logged and ending up in your 'stats'.

But personally, I'd rather know when my site is being scanned by a wanna-be harvester, so that I can investigate the originating IP address range and block it if appropriate.

Jim

[edited by: jdMorgan at 4:14 am (utc) on April 7, 2009]

wqamar

6:20 am on Apr 7, 2009 (gmt 0)

10+ Year Member



its very simple to redirect your 404, 400 and other page.
create a .htaccess file on your root
and type below
ErrorDocument 400 /404.php
ErrorDocument 404 /404.php

be sure 404.php file must be exist.

thanks

liny

6:33 am on Apr 7, 2009 (gmt 0)

10+ Year Member



But sometimes i come across this problem i can do nothing,because my site just locate in a virtual webhost, i don't have the IIS/Apache privileges to redirect it to 400!

ahdtravel

8:02 am on Apr 7, 2009 (gmt 0)

10+ Year Member



But My Platform is on .Net is there any way were i can redirect this from .NET?... Am not able to find these 404, 400 error pages.... have Lods of pages to check.. I was wondering how to find them is there a way were i can find these pages and Redirect them?....