PassengerEnabled On
PassengerAppRoot /home/YOUR_CPANEL_USERNAME/tributeformonicaonyegbado.com
PassengerBaseURI /
PassengerPython /home/YOUR_CPANEL_USERNAME/virtualenv/tributeformonicaonyegbado.com/3.11/bin/python3

# ── Serve static files directly (bypass Python for speed) ───────────────────
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /passenger_wsgi.py/$1 [QSA,L]

# ── Security: block direct access to sensitive files ─────────────────────────
<FilesMatch "\.(db|py|pyc|cfg|ini|log|sh)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# ── Allow uploaded images and static assets ──────────────────────────────────
<FilesMatch "\.(jpg|jpeg|png|gif|webp|css|js|ico|woff|woff2|ttf)$">
    Order Allow,Deny
    Allow from all
</FilesMatch>

# ── Cache static assets ───────────────────────────────────────────────────────
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/png  "access plus 1 month"
    ExpiresByType text/css   "access plus 1 week"
    ExpiresByType text/javascript "access plus 1 week"
</IfModule>
