Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i've got a project which is being checked out directly into public_html folder. What would be the best way to deny access to ".svn" directories and ideally hide them completely (that is, return 404, not 403)?

share|improve this question
Export to deploy, don't checkout. – Shane Madden Oct 11 '11 at 15:56
up vote 1 down vote accepted

Try this:

RedirectMatch 404 /\.svn(/|$)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.