Hi, I have the following code in my .htaccess file to block an IP from accessing a file on my site and it works fine. <Files mypage.html> Order Deny,Allow Deny from XXX.XXX.XXX.XXX </Files> Is there a way to block an IP from accessing a page (e.g., mydomain.com/mypage/)? Thanks for a any ideas.
I think you're misunderstanding something - mydomain.com/mypage/ will just be either an actual folder on the server, or a rewrite (most likely with .htaccess) for mypage.html?id=235 for instance (to get _your_ mypage). So depending on what /mypage/ is really, this should be fairly simple). But it would help to know what it really is.
It's a rewrite with .htaccess. mydomain.com/page.php?page=mypage >>> mydomain.com/mypage/ I want to block access to only /mypage/, not all pages.
So, is the mypage an actual page, or a call to a database based on mypage and perhaps other settings? If the file exists, you can just base it on the original filename.