Leuchtfeuer/typo3-secure-downloads

View on GitHub
Resources/Private/Examples/_.htaccess

Summary

Maintainability
Test Coverage
# Please use that example which fits your Apache version and make sure to adapt the file match pattern
# as configured in "parsing.securedFiletypes"

# Apache 2.4
<IfModule mod_authz_core.c>
    <FilesMatch "\.([pP][dD][fF]|[jJ][pP][eE]?[gG]|[gG][iI][fF]|[pP][nN][gG]|[oO][dD][tT]|[pP][pP][tT][xX]?|[dD][oO][cC][xX]?|[xX][lL][sS][xX]?|[zZ][iI][pP]|[rR][aA][rR]|[tT][gG][zZ]|[tT][aA][rR]|[gG][zZ])$">
        Require all denied
    </FilesMatch>
</IfModule>

# Apache 2.2
<IfModule !mod_authz_core.c>
    <FilesMatch "\.([pP][dD][fF]|[jJ][pP][eE]?[gG]|[gG][iI][fF]|[pP][nN][gG]|[oO][dD][tT]|[pP][pP][tT][xX]?|[dD][oO][cC][xX]?|[xX][lL][sS][xX]?|[zZ][iI][pP]|[rR][aA][rR]|[tT][gG][zZ]|[tT][aA][rR]|[gG][zZ])$">
        Order Allow,Deny
        Deny from all
    </FilesMatch>
</IfModule>