diff --git a/package.json b/package.json
index 895c79f..04695a4 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
},
"scripts": {
"dev": "vite",
- "build": "run-p type-check \"build-only {@}\" --",
+ "build": "run-p type-check \"build-only {@}\" -- && cp public/.htaccess dist/.htaccess",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build",
diff --git a/public/.htaccess b/public/.htaccess
index 4dd8c31..172f2d3 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -1,8 +1,21 @@
+
+ Options -MultiViews
+
+
RewriteEngine On
- RewriteBase /
- RewriteRule ^index\.html$ - [L]
+
+ # Handle Authorization Header
+ 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]
+
+ # Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule . /index.html [L]
+ RewriteRule ^ index.html [L]
diff --git a/vite.config.ts b/vite.config.ts
index d49d708..6e6712b 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -17,4 +17,8 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
+ publicDir: 'public',
+ build: {
+ copyPublicDir: true,
+ },
})