| RewriteEngine On | |
| RewriteBase /reVCDOS/ | |
| # 1. Security Headers (Required) | |
| <IfModule mod_headers.c> | |
| Header set Cross-Origin-Opener-Policy "same-origin" | |
| Header set Cross-Origin-Embedder-Policy "require-corp" | |
| </IfModule> | |
| # 2. DISABLE Apache Compression for .br files (The Fix) | |
| <IfModule mod_deflate.c> | |
| # Tell Apache NOT to gzip these files | |
| SetEnvIfNoCase Request_URI "\.br$" no-gzip dont-vary | |
| </IfModule> | |
| # 3. Explicitly Handle .br Files | |
| <FilesMatch "\.br$"> | |
| # Disable any default filters that might mess with the binary stream | |
| RemoveOutputFilter .br | |
| RemoveType .br | |
| # Tell the browser: "This file is encoded with Brotli" | |
| <IfModule mod_headers.c> | |
| Header set Content-Encoding "br" | |
| # Prevent caching issues during testing | |
| Header set Cache-Control "no-cache, no-store, must-revalidate" | |
| </IfModule> | |
| </FilesMatch> | |
| # 4. Correct MIME Types | |
| AddType application/javascript .js | |
| AddType application/wasm .wasm | |
| AddType text/css .css | |
| # Force MIME types for the specific compressed files | |
| <FilesMatch "\.data\.br$"> | |
| ForceType application/octet-stream | |
| </FilesMatch> | |
| <FilesMatch "\.wasm\.br$"> | |
| ForceType application/wasm | |
| </FilesMatch> | |
| <FilesMatch "\.js\.br$"> | |
| ForceType application/javascript | |
| </FilesMatch> | |
| # 5. Routing | |
| RewriteCond %{REQUEST_FILENAME} -f | |
| RewriteCond %{REQUEST_FILENAME} -d | |
| RewriteRule ^ - | |
| RewriteRule ^.*$ index.php |