Skip to content

Instantly share code, notes, and snippets.

@halimarm
Created February 26, 2021 04:21
Show Gist options
  • Save halimarm/1757ceb3cfc61bbe8c349d9b2bda4959 to your computer and use it in GitHub Desktop.
Save halimarm/1757ceb3cfc61bbe8c349d9b2bda4959 to your computer and use it in GitHub Desktop.
.htaccess Server Config
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^(.*/)?\.git+ - [R=404,L]
<FilesMatch "package.json|package-lock.json|composer.json|license.txt|contributing.md|README.md|readme.rst">
Order Allow,Deny
Deny from all
</FilesMatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment