Skip to content

Instantly share code, notes, and snippets.

@patsma
Created May 18, 2021 11:05
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 patsma/cb80ee417844dca2b2b111e73c32974c to your computer and use it in GitHub Desktop.
Save patsma/cb80ee417844dca2b2b111e73c32974c to your computer and use it in GitHub Desktop.
Options -Indexes
<Files ~ '\.(env|json|config.js|md|gitignore|gitattributes|lock)$'>
Order allow,deny
Deny from all
</Files>
<Files ~ '(composer.json)$'>
Order allow,deny
Deny from all
</Files>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?eg.local
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /web/$1
RewriteCond %{HTTP_HOST} ^(www.)?eg.local
RewriteRule ^(/)?$ index.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment