Well, this is a PHP forum, so, to do it with PHP:
$myip="1.2.3.4";
if ($_SERVER['REMOTE_HOST']!="$myip") {
header("location:myredirect.php");
}
But .htaccess is probably a nice idea also (for example, you wouldn't have to add the above to every page (although if you use a common included header, no big deal 😉 )
At any rate, try http://www.webmasterworld.com/forum92/167.htm for info on using .htaccess.
HTH,