# ===========================
# Root .htaccess configuration
# ===========================

<IfModule mod_rewrite.c>
    # Enable rewrite engine
    RewriteEngine On

    # Redirect all requests to the public directory
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

# ===========================
# PHP Configuration
# ===========================

# Use PHP 8.2 handler for .php and .html files
#<FilesMatch "\.(php|html)$">
#    SetHandler application/x-httpd-alt-php82
#</FilesMatch>

<FilesMatch ".(?:html|php)$">
SetHandler application/x-httpd-alt-php83
</FilesMatch>

# Increase PHP input vars limit
<IfModule mod_php.c>
    php_value max_input_vars 100000
</IfModule>

# ===========================
# Security Rules
# ===========================

# Deny access to .env file
<FilesMatch "^\.env">
    Require all denied
</FilesMatch>
