0

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
</files> 

Does anyone know a better way, maybe using mod_rewrite?

2
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by vectro
1

I thought of using mod_rewrite is an alternative if 'deny from' wasn't working. It turns out I had a bad Apache build. When I rebuilt Apache, the 'deny from' code I posted in the first place ended up working.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.