Skip to content

Instantly share code, notes, and snippets.

@alexbartsch
Created November 24, 2014 08:37
Show Gist options
  • Save alexbartsch/ed49e142ea63cf7b146d to your computer and use it in GitHub Desktop.
Save alexbartsch/ed49e142ea63cf7b146d to your computer and use it in GitHub Desktop.
Deny direct access to git and composer files.
# Deny direct access to several files
RewriteCond %{REQUEST_URI} ^/typo3_src [OR]
RewriteCond %{REQUEST_URI} ^/composer.json [OR]
RewriteCond %{REQUEST_URI} ^/composer.lock [OR]
RewriteCond %{REQUEST_URI} ^/.gitignore [OR]
RewriteCond %{REQUEST_URI} ^/.gitattributes [OR]
RewriteCond %{REQUEST_URI} ^/phpci.yml
RewriteRule .* / [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment