Redirect to a page that does not exist. Then you get the apache created by 404 because you really got to a page that does not exist.
This allows you to βdecideβ who gets this page and who bounces. Of course, if they have the "nofollow" directive in their web client, it will fail.
I do not know how to get along. You have a php page. And ask apache to solve 404 after checking this page. He has already given up control of PHP. Thus, you probably need to defer the request back to apache, rejecting it to a nonexistent file. You can even laugh and redirect a single file name ... but end it with .html instead of php, and if that doesn't exist, then you have a 404 error for web browsers.
source share