I think if you were to use the allow/deny method you would need to use ErrorDocument 403 to redirect. Otherwise you could use mod_rewrite:
Code:
RewriteEngine on
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^127.0.0.0$
RewriteRule .* http://www.google.com/ [R=301,L]