To hide .git and .svn folder contents you need create a .htaccess file with the following:
Code
php_flag display_errors on
RedirectMatch 404 /\\.git(/.*|$)
RedirectMatch 404 /\\.svn(/.*|$)
Another useful setting is to turn on error_reporting:
Code
php_flag display_errors on
php_value error_reporting 7
normal errors - bit value 1
normal warnings - bit value 2
parser errors - bit value 4
1 + 2 + 4 = 7
The following snippet will create a .htaccess file with display_errors on and hide .git and .svn folder contents in the current directory if it doesn't exist, otherwise it will display the contents of the file.
Code
# create .htaccess with display_errors on
alias ht="if [ ! -f .htaccess ]; then echo \"writing to .htaccess\";
echo -e \"php_flag display_errors on\nRedirectMatch 404
/\\\\\\\\\.git(/.*|$)\nRedirectMatch 404 /\\\\\\\\\.svn(/.*|$)\" >
./.htaccess; echo \"done. contents:\"; fi; cat .htaccess;"