Outside the Cube (8816)
Web publishing (65)
about DelphiFAQ (14)
perl CGI (3)
Web Hosting (8)
New related comments
Number of comments in the last 48 hours
Getting started with CSS
Deny everybody acces to a file on web site - using Apache
30 comments. Current rating: (10 votes). Leave comments and/ or rate it.
Question:How can I deny everybody acces to a file on web site? The file is called private.html and in my root folder.
Answer:The simplest solution is to delete the file.
Is it some kind of log file and did you intend to view the file occasionally from the shell? Then you may want to change the rights of the file so no one can see it.
chmod 0 private.html
You can also use .htaccess if you use the Apache web server. Include these lines into your .htaccess file (placed in your root folder):
deny from all
Or you could move the file to a different location - to a directory that is already password protected (and you are the only one having access to it).