请检查此项。htaccess规则。我想阻止所有自述文件和此类文件,但我无法这样做。
Redirect 404 /install.php
Redirect 404 readme.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule (?:readme|license|changelog|-config|-sample)\\.(?:php|md|txt|html?) - [R=404,NC,L]
RewriteRule \\.(?:psd|log|cmd|exe|bat|c?sh)$ - [NC,F]
</IfModule>
Options All -Indexes
<files wp-config.php>
order allow,deny
deny from all
</files>
<files ~ "^.*\\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>