I need .htaccess code that will:

Restrict a specific IP from a specific page.
Allow that IP on any other pages but the restricted one.

I already tried this and it does not work:

Code:
<Files submit.php>
Order Allow,Deny
deny from 1.2.3.
deny from 1.2.
allow from all
</Files>
Does anyone know a better way, maybe using mod_rewrite?