Skip to content

Commit

Permalink
Added an alternative rule to deny access to hidden files
Browse files Browse the repository at this point in the history
  • Loading branch information
An Phan committed Feb 9, 2015
1 parent a79f920 commit 5b44d45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
```

Alternatively, you can just raise a `Not Found` error, giving the attacker dude no clue:
``` apacheconf
RedirectMatch 404 /\..*$
```

### Deny Access to Backup and Source Files
These files may be left by some text/html editors (like Vi/Vim) and pose a great security danger, when anyone can access them.
``` apacheconf
Expand Down

0 comments on commit 5b44d45

Please sign in to comment.