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]