Skip to content

Instantly share code, notes, and snippets.

@brainv
Forked from lynt-smitka/.htaccess
Created December 6, 2019 22:45
Show Gist options
  • Select an option

  • Save brainv/50fbde1385fb0f1cbbeafadbc90a1094 to your computer and use it in GitHub Desktop.

Select an option

Save brainv/50fbde1385fb0f1cbbeafadbc90a1094 to your computer and use it in GitHub Desktop.
Block hidden files except .well-known - Apache .htaccess + Nginx
RewriteRule "(^|/)\.(?!well-known\/)" - [F]
location ~ /\.(?!well-known\/) {
deny all;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment