Install a script to handle 403 errors by adding this line to your .htaccess:
ErrorDocument 403 /forbidden.php
Then handle the redirect in the script:
<?php header('Location: http://google.com');
Or save everything in .htaccess, which you could do:
RewriteEngine On RewriteCond %{REMOTE_ADDR} 127.0.0.1 RewriteRule (.*) http://google.com [R]
source share