Magento and .git directory hiding

If you’re deploying a Magento website using git you surely do not want the .git directory to be visible from the browser, so just put this line in your .htaccess:

RewriteRule .*\.git/.* - [F]

right after:

RewriteEngine on

let’s have a nice day now :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>