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?

2 Answers2

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.

  • More detail on how to do it here: http://webmasters.stackexchange.com/questions/13580/is-there-a-simple-way-to-protect-my-webpage-by-password – paulmorriss Sep 09 '11 at 11:32
1

Try HTTP Authentication

tttony
  • 111
  • 2