Sometimes you may find your web directory is listed when there is no index.php and index.html.
You can disable directory listing in Apache configuration.
For example, your web root directory is: "C:/LMS/canhealth"
To disable directory listing, in httpd.conf, add Options -Indexes
<Directory "C:/LMS/canhealth">
Options -Indexes
</Directory>
You can see a message when accessing this directory if there is no index.php and index.html :
Forbidden
You don't have permission to access /canhealth/ on this server.To enable directory listing,
in httpd.conf
<Directory "C:/LMS/canhealth">
Options +Indexes
</Directory>
Video: Apache - disable and enable directory listing
No comments:
Post a Comment