Browse Source

Add .htaccess for Apache SPA routing

- Added .htaccess to public folder for automatic inclusion in builds
- Configures Apache to redirect all routes to index.html
- Enables proper SPA routing without 404 errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
송용우 2 months ago
parent
commit
14310c601c
1 changed files with 11 additions and 0 deletions
  1. 11 0
      public/.htaccess

+ 11 - 0
public/.htaccess

@@ -0,0 +1,11 @@
+<IfModule mod_rewrite.c>
+  RewriteEngine On
+  RewriteBase /
+
+  # 실제 파일이나 디렉토리가 아닌 경우 index.html로 리다이렉트
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteCond %{REQUEST_URI} !^/_nuxt
+  RewriteCond %{REQUEST_URI} !^/img
+  RewriteRule ^.*$ /index.html [L]
+</IfModule>