RewriteEngine On
RewriteRule ^shop\.php$ shop_fixed.php [NC,L]

# Publish hardening: block dev/diagnostic scripts from the public web
<IfModule mod_authz_core.c>
    <FilesMatch "^(test_|setup_|repair_|step_test|mobile-test|public_demo|test\.php|AM_I_SYNCED\.php|debug_|diagnostic|check_pages|simple_test|ufo_syntax|ufo_test|FIX_SALES|db_test_port|standalone_fix)">
        Require all denied
    </FilesMatch>
</IfModule>
<IfModule !mod_authz_core.c>
    <FilesMatch "^(test_|setup_|repair_|step_test|mobile-test|public_demo|test\.php|AM_I_SYNCED\.php|debug_|diagnostic|check_pages|simple_test|ufo_syntax|ufo_test|FIX_SALES|db_test_port|standalone_fix)">
        Order allow,deny
        Deny from all
    </FilesMatch>
</IfModule>

# Aeris static asset performance (include in site/panel .htaccess)
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
    AddOutputFilterByType DEFLATE application/javascript application/json application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml image/svg+xml
    AddOutputFilterByType DEFLATE font/ttf font/otf font/woff font/woff2 application/font-woff application/font-woff2
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/webp "access plus 1 year"
    ExpiresByType image/svg+xml "access plus 1 year"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresByType text/css "access plus 1 year"
    ExpiresByType application/javascript "access plus 1 year"
    ExpiresByType text/javascript "access plus 1 year"
    ExpiresByType font/woff2 "access plus 1 year"
    ExpiresByType font/woff "access plus 1 year"
    ExpiresByType application/font-woff2 "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
    <FilesMatch "\.(css|js|mjs|woff2?|ttf|otf|eot|png|jpe?g|gif|webp|svg|ico)$">
        Header set Cache-Control "public, max-age=31536000, immutable"
    </FilesMatch>
</IfModule>

