Options -Indexes

# ── Security: block sensitive file types ──────────────────
<FilesMatch "\.(sql|log|env|sh)$">
    Require all denied
</FilesMatch>

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wpgroup/

    # ── Block direct access to config/core directories ──
    RewriteRule ^config/ - [F,L]
    RewriteRule ^core/ - [F,L]
    RewriteRule ^install/ - [F,L]

    # ── Pass existing files/dirs through unchanged ───────
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
</IfModule>

# ── PHP Settings ──────────────────────────────────────────
<IfModule mod_php7.c>
    php_value upload_max_filesize 5M
    php_value post_max_size 8M
    php_value memory_limit 128M
    php_value max_execution_time 60
</IfModule>
