Home  >  Article  >  Operation and Maintenance  >  If the index file is lost, how to invalidate the directory listing?

If the index file is lost, how to invalidate the directory listing?

王林
王林forward
2020-07-08 17:25:333376browse

If the index file is lost, how to invalidate the directory listing?

Solution:

(Recommended learning: apache from entry to proficiency)

If the main directory in the site root directory If the index file fails, Apache will list all files with similar content on the browser to replace the site homepage.

In order to turn off Apache directory listing, you can make global settings in the main configuration file, or set the following rules in the .htaccess file:

<Directory /var/www/html>
   Options -Indexes
</Directory>

The above is the detailed content of If the index file is lost, how to invalidate the directory listing?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete