mod_rewrite: Send users from specific IP a 404 error

How can I use mod_rewrite to send users from a specific IP address a 404 error when they try to access my site?
Who is Participating?
JamesCsslConnect With a Mentor Commented:
RewriteCond %{REMOTE_ADDR} ^$
RewriteRule ^.* - [F]

This would send 403 Forbidden

RewriteCond %{REMOTE_ADDR} ^$
RewriteRule ^.* - [G]

and this would send 410 Gone.  The only way I can think of to make a 404 error is to proxy to a page that produces a 404 error.
rbichonAuthor Commented:
I'll just use the 403 Forbidden one.then. It worked perfectly. Is there a way to give a 500 Internal server error instead so that they think our site is down?
As with trying to generate a 404 error, generating a 500 error while the server is working perfectly would be quite difficult.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.