如何禁止别人通过web浏览wordpress文件夹,限制wordpress浏览文件夹的权限,其实很简单,就一句话,改完别忘记reload apache2。
root@debian:/etc/apache2/sites-available# vi default
# Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks MultiViews /* 去掉 Indexes
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2’s default start page
# in /apache2-default/, but still have / go to the right place
# RedirectMatch ^/$ /apache2-default/
reload apache2后,访问目录变成:
Directory Listing Denied
This Virtual Directory does not allow contents to be listed.
这个文章技术不错,很实用的。禁止别人蓄意流浪WP!
采用之。
主人回复:嘎嘎,防止主题被恶意浏览~