From 6c33bf46dc08e9374eef5d195e8733283b77c31a Mon Sep 17 00:00:00 2001 From: Roham Date: Wed, 24 Dec 2025 00:42:37 +0000 Subject: [PATCH] -ADDED .HTACCESS TO SUPPORT SUB DIRS --- .htaccess | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..4f93bf3 --- /dev/null +++ b/.htaccess @@ -0,0 +1,47 @@ +# JS files +AddType application/javascript .js + +# WebAssembly files +AddType application/wasm .wasm + +# CSS files +AddType text/css .css + +# Brotli-compressed files +AddEncoding br .br + + + +# Enable rewrite engine +RewriteEngine On + +# Set base path if PHP file is not in root +RewriteBase / + +# If the request is for an existing file or directory, serve it directly +RewriteCond %{REQUEST_FILENAME} -f [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^ - [L] + +# Otherwise, route everything to index.php +RewriteRule ^.*$ index.php [L,QSA] + + +# Correct MIME types +AddType application/javascript .js +AddType application/wasm .wasm +AddType text/css .css + +# Brotli compressed files +AddEncoding br .br + +# Optional: force correct MIME for .js.br or .wasm.br + + ForceType application/javascript + AddEncoding br + + + + ForceType application/wasm + AddEncoding br + \ No newline at end of file