# IF.docs.md2html - StackCP deployment config
# Enable URL rewriting
RewriteEngine On
RewriteBase /infrafabric/IF.docs.md2html/
# Handle Next.js static export routing
# Allow access to static files
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Route all other requests to index.html (SPA)
RewriteRule ^(.*)$ index.html [L,QSA]
# CORS headers for fetching external markdown files
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, OPTIONS"
Header set Access-Control-Allow-Headers "Content-Type"
# Gzip compression for text files
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
# Browser caching
ExpiresActive On
ExpiresByType text/html "access plus 1 hour"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"