Skip to content

Instantly share code, notes, and snippets.

@onocom
Created September 26, 2017 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onocom/ff9789284a987181ad28877f1656fdae to your computer and use it in GitHub Desktop.
Save onocom/ff9789284a987181ad28877f1656fdae to your computer and use it in GitHub Desktop.
WordPress security settings .htaccess
# .htaccessの上の方に追加
# TOPページへのPOSTアクセスを拒否
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{REQUEST_METHOD} ^POST
RewriteRule .* - [F]
</IfModule>
# wp-contents/uploads/直下に .htaccess を作成し、以下を記載
# バックドア等はupload機能を用いてアップされることが多いので、一般にphpファイルが存在しないuploads配下ではphpファイルへのアクセスを拒否
<Files *.php>
deny from all
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment