# WiC64 D64 Writer folder (Apache 2.4)
# Nothing in this folder and its subfolders is executed by the web server,
# except save.php and d64dir.php of this package.
# - every file with a dot in its name is blocked ...
# - ... except *.d64, *.prg (delivered as plain downloads) and the two scripts
# - no CGI, no server side includes
# The folder itself (and subfolders) open d64dir.php as the list.

Options -ExecCGI -Includes
DirectoryIndex d64dir.php

<FilesMatch "\.">
    Require all denied
</FilesMatch>

<FilesMatch "^[^.].*\.(?i:d64|prg)$">
    Require all granted
    SetHandler None
    RemoveHandler .php .php3 .php4 .php5 .php7 .php8 .phtml .pht .phar .cgi .pl .py .shtml
    ForceType application/octet-stream
    <IfModule mod_headers.c>
        Header set X-Content-Type-Options nosniff
        Header set Content-Disposition attachment
    </IfModule>
</FilesMatch>

<FilesMatch "^(save|d64dir)\.php$">
    Require all granted
</FilesMatch>
