From f30c9c615528efe075d033d3fe19ec8d6f54543e Mon Sep 17 00:00:00 2001 From: popovskik Date: Tue, 4 Aug 2026 02:08:37 +0200 Subject: [PATCH] hotfix(.htaccess): stop cross-domain redirect that 404'd the live site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .htaccess | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.htaccess b/.htaccess index d36aa188..8a98e89f 100644 --- a/.htaccess +++ b/.htaccess @@ -1,12 +1,14 @@ RewriteEngine on -# ----- Canonical domain + language root ----- -# Migrate the old host to the canonical domain, preserving the path. -RewriteCond %{HTTP_HOST} ^(www\.)?msos\.spletnimojster\.si$ [NC] -RewriteRule ^ https://msosorg.com%{REQUEST_URI} [R=301,L] -# Send the bare root to the default-language homepage. -RewriteRule ^/?$ https://msosorg.com/en/ [R=301,L] +# ----- Language root redirect ----- +# Send the bare root to the default-language homepage, on WHATEVER host is +# serving the site (relative — no cross-domain redirect). Do NOT force +# msosorg.com here: the site is currently served from msos.spletnimojster.si, +# and msosorg.com does not yet serve these files, so forcing it 404s. +# 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 ----- # (The deploy already excludes these; this is a safety net. robots.txt,