.htaccessファイルの設定について
wp直下と、/wp-admin直下の2つのディレクトリに.htaccessを設定している。
両方ともに管理画面にアクセスする際のIPアドレスの設定をしているので、新たなIPアドレスの設定がある場合はこの2つを修正すること!
wp以下の.htaccessの内容
wp-login.phpにたいしてのアクセス制限
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
<Files “wp-config.php”>
order deny,allow
deny from all
</Files>
<Files “wp-login.php”>
order deny,allow
deny from all
Allow from 133.232.97.8
</Files>
<Files “xmlrpc.php”>
order deny,allow
deny from all
</Files>
# END WordPress
/wp-admin配下の.htaccessの内容
Order Deny,Allow
Deny from all
Allow from 133.232.97.8
<FilesMatch “(admin-ajax\.php)$”>
Satisfy Any
Order allow,deny
Allow from all
Deny from none
</FilesMatch>