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:

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