Forum Moderators: phranque

Message Too Old, No Replies

403 spam 404s by detecting double http string in request?

Can we 403 a request with two http strings via .htaccess?

         

JAB Creations

2:48 am on Mar 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For some time now spammers have been requesting files (whether they exist or not) with their spam URLs at the end.

Is there a way in Apache to detect a request with more then one 'http' string in the request in order to mark it as a 403 instead of a 404?

- John

g1smd

8:13 pm on Mar 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There sure is.

You test the requested URL for the prescence of the unwanted pattern and then serve them that status.

The code for that goes in your .htaccess file. Check recent posts for some ideas as to how to get started.