From 873579d5b007079d9629794cd089ca8bfb77240e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Sat, 24 Oct 2026 14:28:47 +0200 Subject: [PATCH] feat: legacy domain and /buchung redirects in TYPO3 13's .htaccess Ported unchanged from TYPO3 10's public/.htaccess, whose rules the static docroots carry until the vhosts point at TYPO3 13; Force SSL as there. Co-Authored-By: Claude Opus 5.5 --- public/.htaccess | 56 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/public/.htaccess b/public/.htaccess index 3610509..fc513e1 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -297,6 +297,58 @@ AddDefaultCharset utf-8 # Enable URL rewriting RewriteEngine On + # Legacy and campaign domains, consolidated onto their current host (from TYPO3 10's + # public/.htaccess, which the static docroots carry until the vhosts point here). These have to + # stay ahead of the Force SSL block and of TYPO3's catch-all at the end of this file. + RewriteRule ^buchung/(.*)$ https://bpn.ep-reisen.de/$1 [R=302,L,QSA] + + RewriteCond %{HTTP_HOST} ^cllt\-touristik\.at$ [NC] + RewriteRule ^(.*) https://www.cllt-touristik.at/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ^alpinevacation\.ch$ [NC] + RewriteRule ^(.*) https://www.alpinevacation.ch/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ^(www\.)?semesterendeskireisen\.de$ [NC] + RewriteRule ^(.*) https://www.semesterende-skireisen.de/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ^semesterende\-skireisen\.de$ [NC] + RewriteRule ^(.*) https://www.semesterende-skireisen.de/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ^snowzone\.net$ [NC] + RewriteRule ^(.*) https://www.snowzone.net/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ^ski\-boarderweek\.de$ [NC] + RewriteRule ^(.*) https://www.ski-boarderweek.de/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ski\-boarderweek\.(com|eu)$ [NC] + RewriteRule ^(.*) https://www.ski-boarderweek.de/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} skiboarderweek\.(de|eu)$ [NC] + RewriteRule ^(.*) https://www.ski-boarderweek.de/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ^ski\-wochenenden\.de$ [NC] + RewriteRule ^(.*) https://www.ski-wochenenden.de/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ^ep\-events\.de$ [NC] + RewriteRule ^(.*) https://www.ep-events.de/$1 [L,R=301] + + RewriteCond %{HTTP_HOST} ^ep\-reisen\.de$ [NC] + RewriteRule ^(.*) https://www.ep-reisen.de/$1 [L,R=301] + + # The dropped path is deliberate: snow-break sends every deep link to the snowbreak + # landing page, unlike unichamp below, which keeps it. + RewriteCond %{HTTP_HOST} ^(www\.)?snow\-break\.(de|com) [NC] + RewriteRule (.*) https://snowbreak.ep-reisen.de/ [R=302,L] + + # Matches the bare domain as well, so it lands on snowbreak in one hop. + RewriteCond %{HTTP_HOST} ^(www\.)?unichamp\.de$ [NC] + RewriteRule ^(.*) https://snowbreak.ep-reisen.de/$1 [L,R=302] + + # Force SSL + RewriteCond %{HTTPS} off + RewriteCond %{HTTP:X-Forwarded-Proto} =http + RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L] + # Store the current location in an environment variable CWD to use # mod_rewrite in .htaccess files without knowing the RewriteBase RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$ @@ -305,8 +357,8 @@ AddDefaultCharset utf-8 # Rules to set ApplicationContext based on hostname #RewriteCond %{HTTP_HOST} ^dev\.example\.com$ #RewriteRule .? - [E=TYPO3_CONTEXT:Development] - # Test vhost of the hybrid go-live (base variant in config/sites/ep-reisen); production - # traffic never reaches this file, the static docroots have their own .htaccess + # Test vhost (base variant in config/sites/ep-reisen); the production vhosts point here site by + # site (phase F), until then the static docroots have their own .htaccess RewriteCond %{HTTP_HOST} ^staging\.ep-reisen\.de$ RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging] # The frontend lives on www.ep-reisen.de (static export + TYPO3 13); here it would be duplicate