mirror of
https://github.com/phanan/htaccess.git
synced 2018-11-08 13:39:40 +01:00
Added an alternative rule to deny access to hidden files
This commit is contained in:
parent
a79f9201cd
commit
5b44d452a9
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue