fbd4e92e9f
Full rewrite: swap out the v1 framework (src/, controllers/, views/, twig/, sass/, skeleton/) for the working v2 codebase from phpproject (App/, novaconium/, public/).
18 lines
585 B
ApacheConf
18 lines
585 B
ApacheConf
RewriteEngine On
|
|
|
|
# 1) Canonical URLs: strip trailing slash (except bare root) — 301 for SEO.
|
|
RewriteCond %{REQUEST_URI} ^/.+/$
|
|
RewriteRule ^(.+)/$ /$1 [R=301,L]
|
|
|
|
# 2) Serve pre-rendered static cache file directly, bypassing PHP entirely.
|
|
RewriteCond %{DOCUMENT_ROOT}/cache/$1/index.html -f
|
|
RewriteRule ^(.*)$ /cache/$1/index.html [L]
|
|
|
|
# 3) Serve real files/directories as-is (css, cache assets, etc.).
|
|
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
|
RewriteCond %{REQUEST_FILENAME} -d
|
|
RewriteRule ^ - [L]
|
|
|
|
# 4) Everything else goes through the front controller.
|
|
RewriteRule ^ index.php [L]
|