I use apache and php, in a directory in the /home/httpd/html tree, I have three types of files :
- Normal <*.php> files (accessible for everybody)
- Administration <*.admin.php> files (accessible only from one IP adress)
- php include <*.inc> files (unaccessible)
The content of the .htaccess file in this directory is :
Order Deny,Allow
Deny from All
Allow from All
Options Indexes
<Files /home/http2/html/agenda/*.inc>
Order Deny,Allow
Deny from All
</Files>
<Files /home/httpd2/html/agenda/*.admin.php>
Order Deny,Allow
Deny from All
Allow from xxx.xxx.xxx.xxx (my IP adress)
</Files>
- Normal <*.php> files (accessible for everybody)
- Administration <*.admin.php> files (accessible only from one IP adress)
- php include <*.inc> files (unaccessible)
The content of the .htaccess file in this directory is :
Order Deny,Allow
Deny from All
Allow from All
Options Indexes
<Files /home/http2/html/agenda/*.inc>
Order Deny,Allow
Deny from All
</Files>
<Files /home/httpd2/html/agenda/*.admin.php>
Order Deny,Allow
Deny from All
Allow from xxx.xxx.xxx.xxx (my IP adress)
</Files>