Wp includes access control

时间:2019-02-07 作者:Forums Pif

每个人都可以轻松访问我的wp,包括如何隐藏或不让用户看到文件有人能帮我吗这是我的wordpress网站链接看到每个人都可以看到https://pifserver.ml/wp-includes

1 个回复
最合适的回答,由SO网友:Lucien Dubois 整理而成

考虑到您有一台Apache服务器,请在中使用此完整代码。htaccess文件:

# Block the include-only files.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
作为奖励,我还要补充以下内容:

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

相关推荐

WordPress wp-admin css未加载

以前有SSL现在没有SSL我的word press管理仪表板css未加载,但主页和其他页面工作正常有人知道如何修复此问题吗?没有ssl,只是http已经有人问了同样的问题,但这些答案并不能解决我的问题Wordpress wp-admin suddenly lost its styleWordpress Admin Panel Completely Distorted, no css at all来自其他堆栈交换网络的相同问题Wordpress admin not loading css/jswordpre