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 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-22 11:07:08 +02:00
1 parent 4d4baa1124
commit bdc1bf4b9f
1 file changed
+7
+7
View File
@@ -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]