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

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

王林
Release: 2020-07-08 17:25:33
forward
3501 people have browsed it

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>
Copy after login

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!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template