wordpressを使う際に、セキュリティを考慮して.htaccessに記述しておいたほうが良いもの
wordpressは、管理画面のURLが共通などの理由から、攻撃されやすくなっています。
そこで、セキュリティを考慮して下記の記述を.htaccessに記述しおいたほうが良いです。
.htaccessは、公開ディレクトリのすぐ直下に設置します。
既に存在していれば追記で、なければ新たに作成してください。
ファイル名は.htaccessです。ファイル名の頭にドットが付きます。
(#の部分も全てコピーしてください。)
###################################################### # for security ###################################################### # Block the include-only files. 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] # protect wp-config.php order allow,deny deny from all # Options -Indexes RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] ###################################################### # APC ###################################################### php_flag apc.cache_by_default Off ######################################################
それともう一つ、管理画面へのアクセスは、IPアドレス制限をかけてくおくとなお安心です。
wp-admin/.htaccessを作成し、allow from のあとに、許可するIPアドレスを記述しましよう。
複数許可したい場合は、allow from の行を複数書きましょう。
wp-admin/.htacess order allow,deny allow from xxx.xxx.xxx.xxx
The following two tabs change content below.

タビート
いつもカメラ持って辺境の地を旅してます。人生も旅です。たぶん。

最新記事 by タビート (全て見る)
- wordpressを使う際に、セキュリティを考慮して.htaccessに記述しておいたほうが良いもの - 2014年4月18日
- Internet Explorer6さん、死去 - 2014年4月10日
- 渋谷道玄坂 首都高3号線 火災 - 2014年3月20日
最近WordPressを利用し始めてわからないことだらけなのですごく助かりました!
セキュリティ面は大切ですもんね・・・(;・∀・)