diff --git a/.htaccess b/.htaccess
index 101cc5c..a3c540c 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,14 +1,32 @@
-Options +SymLinksIfOwnerMatch
-RewriteEngine On
+
+
+ Options -MultiViews -Indexes
+
-# Allow Installatron requests
-RewriteCond %{REQUEST_FILENAME} deleteme\.\w+\.php
-RewriteRule (.*) - [L]
+ RewriteEngine On
-RewriteRule ^ index.php [L]
+ # Preserve Authorization header for API/auth
+ RewriteCond %{HTTP:Authorization} .
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
-
+ # Redirect any requests for /home/... static files into the public/home folder
+ RewriteCond %{REQUEST_URI} !^/public/
+ RewriteCond %{REQUEST_URI} ^/home/.*\.(css|js|png|jpe?g|gif|svg|ico|woff2?|ttf|eot|otf|webp)$ [NC]
+ RewriteRule ^(.*)$ public/$1 [L]
-SetHandler application/x-lsphp81
+ # Serve existing files and directories directly
+ RewriteCond %{REQUEST_FILENAME} -f [OR]
+ RewriteCond %{REQUEST_FILENAME} -d
+ RewriteRule ^ - [L]
-
\ No newline at end of file
+ # Remove trailing slashes for non-directories
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^(.+)/$ /$1 [L,R=301]
+
+ # All other requests go to Laravel's front controller
+ RewriteRule ^ index.php [L]
+
+
+
+ SetHandler application/x-lsphp81
+
diff --git a/public/.htaccess b/public/.htaccess
index 3aec5e2..a3c540c 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -5,17 +5,28 @@
RewriteEngine On
- # Handle Authorization Header
+ # Preserve Authorization header for API/auth
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
- # Redirect Trailing Slashes If Not A Folder...
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_URI} (.+)/$
- RewriteRule ^ %1 [L,R=301]
+ # Redirect any requests for /home/... static files into the public/home folder
+ RewriteCond %{REQUEST_URI} !^/public/
+ RewriteCond %{REQUEST_URI} ^/home/.*\.(css|js|png|jpe?g|gif|svg|ico|woff2?|ttf|eot|otf|webp)$ [NC]
+ RewriteRule ^(.*)$ public/$1 [L]
- # Send Requests To Front Controller...
+ # Serve existing files and directories directly
+ RewriteCond %{REQUEST_FILENAME} -f [OR]
+ RewriteCond %{REQUEST_FILENAME} -d
+ RewriteRule ^ - [L]
+
+ # Remove trailing slashes for non-directories
RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^(.+)/$ /$1 [L,R=301]
+
+ # All other requests go to Laravel's front controller
RewriteRule ^ index.php [L]
+
+
+ SetHandler application/x-lsphp81
+