hotfix(.htaccess): stop cross-domain redirect that 404'd the live site

The earlier "canonical domain" redirect forced msos.spletnimojster.si (where
the site is actually served) to msosorg.com, which does NOT yet host these
files — so every page 404'd. Replace it with a host-relative root -> /en/
redirect so the live domain serves the site again. A canonical-host redirect
can be re-added once msosorg.com is pointed at this same docroot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
popovskik 2026-08-04 02:08:37 +02:00
parent 55bc101410
commit f30c9c6155
1 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,14 @@
RewriteEngine on RewriteEngine on
# ----- Canonical domain + language root ----- # ----- Language root redirect -----
# Migrate the old host to the canonical domain, preserving the path. # Send the bare root to the default-language homepage, on WHATEVER host is
RewriteCond %{HTTP_HOST} ^(www\.)?msos\.spletnimojster\.si$ [NC] # serving the site (relative — no cross-domain redirect). Do NOT force
RewriteRule ^ https://msosorg.com%{REQUEST_URI} [R=301,L] # msosorg.com here: the site is currently served from msos.spletnimojster.si,
# Send the bare root to the default-language homepage. # and msosorg.com does not yet serve these files, so forcing it 404s.
RewriteRule ^/?$ https://msosorg.com/en/ [R=301,L] # Once msosorg.com is pointed at this same docroot, a canonical-host redirect
# can be added back safely.
RewriteRule ^/?$ /en/ [R=301,L]
# ----- Defense-in-depth: block dev/sensitive files if they ever ship ----- # ----- Defense-in-depth: block dev/sensitive files if they ever ship -----
# (The deploy already excludes these; this is a safety net. robots.txt, # (The deploy already excludes these; this is a safety net. robots.txt,