# PUQ-installed minimal .htaccess for net2ftp.
#
# Upstream ships `.htaccess` with a bare `php_value max_input_vars 10000`
# directive — that produces a 500 Internal Server Error on Apache + PHP-FPM
# (where `php_value` is not a recognized directive). We replace it with this
# safer version that only sets the value when mod_php is active.

<IfModule mod_php7.c>
    php_value max_input_vars 10000
</IfModule>
<IfModule mod_php.c>
    php_value max_input_vars 10000
</IfModule>

# Block direct access to the SSO config (HMAC secret lives here).
<Files "_puq_config.php">
    Order allow,deny
    Deny from all
</Files>

# Block direct access to the renamed upstream entry. All requests MUST go
# through our wrapper (index.php), which gates on the SSO session marker.
# Otherwise someone could hit /_n2f/_n2f_main.php directly and bypass auth.
<Files "_n2f_main.php">
    Order allow,deny
    Deny from all
</Files>
