Files
novaconium/public/.htaccess
T
code fbd4e92e9f Replace v1 with v2 codebase
Full rewrite: swap out the v1 framework (src/, controllers/, views/,
twig/, sass/, skeleton/) for the working v2 codebase from phpproject
(App/, novaconium/, public/).
2026-07-14 01:58:25 +00:00

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]