Quote:
Originally posted by mxcreep
Manie / Armand is right, the hits from a HEAD request made by a socket still executes your php code and the false hits and clicks will be counted....
The only thing the .htaccess does is sending only an error header back to the client.
Next problem wih .htaccess in this case is that you're always later to discover a ip change, so if beja changes ip's (proxy or whatever) you're script is counting fake hits for a time until you discover...
|
Sorry, but that's not true. If you block HEAD or any other requests in a htaccess your script will not be executed.
Here's the htaccess code to block HEAD requests.
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^HEAD$
RewriteRule .* - [F,L]
This code will send a 403 Forbidden response to the bot and your script will not be executed.