security - Should I prevent access to .htaccess and wp-config.php files?

Someone at stackoverflow suggested I should deny access to the two files by doing below in .htaccess.<files ~ "^

Someone at stackoverflow suggested I should deny access to the two files by doing below in .htaccess.

<files ~ "^.*\.([Hh][Tt][Aa])">

order allow,deny

deny from all

satisfy all

</files>

<files wp-config.php>

order allow,deny

deny from all

</files>

The problem is it screwed up my installation of W3 Total Cache plugin cos it needs to write to those files.

Since my htaccess and wp-config were hacked a few times, what is the best way to protect these files?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744693101a4588328.html

相关推荐

  • security - Should I prevent access to .htaccess and wp-config.php files?

    Someone at stackoverflow suggested I should deny access to the two files by doing below in .htaccess.<files ~ "^

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信