2

How do I make certain pages only viewable by me? For example, let's say I own mydomain.com, and I want to be the only one that can see mydomain.com/mypage.php.

I tried changing the permissions of the file to 700, but then I just get a 'you don't have permission' error when I try to access it.

Any ideas?

1
  • Htaccess Authentication comes to mind
    – Dagon
    Commented Sep 8, 2011 at 21:56

2 Answers 2

4

Changing the permissions on the file just keeps the webserver from being able to access it, which means NO ONE can access it at all. If you want to restrict it to just yourself, add a login (http basic authentication), add some IP filtering, then hide the script in a directory with a very non-guessable name and don't refer to it from any "public" page where its existence could be revealed.

1
1

Try HTTP Authentication

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.