Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lazyjerry/7b40f20c6e5964d55fd670733f7a443e to your computer and use it in GitHub Desktop.
Save lazyjerry/7b40f20c6e5964d55fd670733f7a443e to your computer and use it in GitHub Desktop.
# 禁用第二層以上目錄的 php 檔案
location ~* /(.*)([^/]+)/(.*)\.php$ {
deny all;
}
# 禁用 index.php 以外的 php 檔案
location ~ ^/(?!index\.php).*\.php$ {
deny all;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment