DelphiFAQ Home Search:

InterBase, MS-SQL, mysql, Oracle
C#, C++, Delphi, Java,
JavaScript, perl, php, Visual Basic, VBScript
Apache, Network, Shell
Web Publishing
JavaScript, perl CGI, VBScript, Web Hosting
Apache, File Types, Internet Explorer,
Network, Printing, Processes
Outside the Cube
Auto, Computer Hardware,
Finances, Dating Scams,
Household, Male Dating Scammers,
Other Scams, Travel

Featured Article

Deny everybody acces to a file on web site - using Apache


How can I deny everybody acces to a file on web site? The file is called private.html and in my root folder.


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):
<Files "private.html">
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).

Generated 8:03:18 on Sep 22, 2019