2026-09-04 13:37:07 +01:00
|
|
|
# The built Vue SPA is served from this directory (baked into the Docker image);
|
|
|
|
|
# the Slim front controller handles the API. Anything that isn't a real file is
|
|
|
|
|
# a client-side route and falls back to index.html.
|
2026-09-03 17:35:10 +01:00
|
|
|
RewriteEngine On
|
2026-09-04 13:37:07 +01:00
|
|
|
|
|
|
|
|
# API: hand off to the front controller.
|
|
|
|
|
RewriteRule ^api(/|$) index.php [QSA,L]
|
|
|
|
|
|
|
|
|
|
# Real files (hashed assets, favicon, manifest, service worker): serve directly.
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -f
|
|
|
|
|
RewriteRule ^ - [L]
|
|
|
|
|
|
|
|
|
|
# SPA fallback when a build is present; otherwise the API front controller
|
|
|
|
|
# (e.g. `composer serve` with no frontend built).
|
|
|
|
|
RewriteCond %{DOCUMENT_ROOT}/index.html -f
|
|
|
|
|
RewriteRule ^ index.html [L]
|
|
|
|
|
RewriteRule ^ index.php [L]
|