From d338529afcd18f8934bba7c85f332e9202d644df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Sat, 26 Sep 2026 10:03:07 +0200 Subject: [PATCH] chore: cleanup .htaccess --- deploy.php | 1 - public/.htaccess | 53 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/deploy.php b/deploy.php index e1c3b557..882b7db1 100644 --- a/deploy.php +++ b/deploy.php @@ -38,7 +38,6 @@ $rsyncOptions = [ 'var', '.editorconfig', '.gitignore', - '.htaccess_prod', 'deploy.php', 'package.json', 'package-lock.json', diff --git a/public/.htaccess b/public/.htaccess index d47a22eb..4d7c105d 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -303,7 +303,58 @@ AddDefaultCharset utf-8 # Enable URL rewriting RewriteEngine On - # Force SSL + # Legacy and campaign domains, consolidated onto their current host. These have to stay + # ahead of the Force SSL block and of TYPO3's catch-all at the end of this file, or a + # request for one of them reaches index.php before it is ever redirected. + # + # Maintained here rather than on the host: the deploy rsyncs this file into every release + # (deploy.php), so anything edited live is gone after the next one. + 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 - a separate + # unichamp.de -> www.unichamp.de rule used to run first and cost an extra 301. + 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]