From bdc1bf4b9f368b59c15fb982d9116cfa4eb211f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 22 Oct 2026 11:07:08 +0200 Subject: [PATCH] fix: redirect the staging frontend to www.ep-reisen.de staging.ep-reisen.de rendered every page through TYPO3 13 with its own canonical URL, so search engines saw a full duplicate of the site. The frontend now answers 301 to the same URL on www, which keeps serving its mix of static export and TYPO3 13. The backend (/typo3) and the files it loads (/_assets, /typo3temp, /fileadmin) as well as /.well-known stay on staging. www never reads this .htaccess: its stub includes the release's index.php directly. Co-Authored-By: Claude Opus 5.5 --- public/.htaccess | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/.htaccess b/public/.htaccess index 9154983..8d517d5 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -300,6 +300,13 @@ AddDefaultCharset utf-8 # traffic never reaches this file, 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 + # content, so only the backend and the files it loads stay on this host + # (original requests only: the index.php hand-over below runs through these rules again) + RewriteCond %{ENV:REDIRECT_STATUS} ^$ + RewriteCond %{HTTP_HOST} ^staging\.ep-reisen\.de$ [NC] + RewriteCond %{REQUEST_URI} !^/(?:typo3|_assets|typo3temp|fileadmin|\.well-known)(?:/|$) + RewriteRule ^ https://www.ep-reisen.de%{REQUEST_URI} [R=301,L] #RewriteCond %{HTTP_HOST} ^www\.example\.com$ #RewriteRule .? - [E=TYPO3_CONTEXT:Production]