# Simple .htaccess for Next.js in /konfigurator/
RewriteEngine On

# Handle static files first
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Handle API requests
RewriteRule ^api/(.*)$ /konfigurator/index.html [L]

# Handle all other requests
RewriteRule ^(.*)$ /konfigurator/index.html [L]

# Set MIME types
AddType application/javascript .js
AddType text/css .css
