Skip to content

Instantly share code, notes, and snippets.

@quangbahoa
Last active December 21, 2016 09:53
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 quangbahoa/aef724fbfc43a097aa46a6ca7c5e2bde to your computer and use it in GitHub Desktop.
Save quangbahoa/aef724fbfc43a097aa46a6ca7c5e2bde to your computer and use it in GitHub Desktop.
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* .php$ {
deny all;
}
location ~ ^(index\.php)?$ {
allow all;
}
location ~* /wp-includes/.*.php$ {
deny all;
access_log off;
log_not_found off;
}
location ~* /wp-content/.*.php$ {
deny all;
access_log off;
log_not_found off;
}
location ~* /(?:uploads|files)/.*.php$ {
deny all;
access_log off;
log_not_found off;
}
location /xmlrpc.php {
deny all;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment