From 813f63752c4ff57eaf377c4bd77fedd284256196 Mon Sep 17 00:00:00 2001
From: Armin Ruediger Vieweg <armin@v.ieweg.de>
Date: Thu, 22 May 2014 16:07:53 +0200
Subject: [PATCH] [BUGFIX] Fix RewriteRule for context to avoid HTTP 500

The affected rules are those for TYPO3_CONTEXT.
These rules should just set the ENV variable,
but should not touch the URL.
According to apache httpd docs this has to be
indicated by using a dash.

Also unnecessary grouping in the regexp has been
removed.

Resolves: #59037
Releases: 6.3, 6.2
Change-Id: I56cadcfb3cfae0a0ee679c6886cda9f5498fc47c
Reviewed-on: https://review.typo3.org/30328
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Armin Ruediger Vieweg
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
---
 _.htaccess | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/_.htaccess b/_.htaccess
index d1d11d4bfc78..23fa98b7fe45 100644
--- a/_.htaccess
+++ b/_.htaccess
@@ -85,11 +85,11 @@ RewriteEngine On
 
 # Rules to set ApplicationContext based on hostname
 #RewriteCond %{HTTP_HOST} ^dev\.example\.com$
-#RewriteRule (.*) $1 [E=TYPO3_CONTEXT:Development]
+#RewriteRule .? - [E=TYPO3_CONTEXT:Development]
 #RewriteCond %{HTTP_HOST} ^staging\.example\.com$
-#RewriteRule (.*) $1 [E=TYPO3_CONTEXT:Production/Staging]
+#RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging]
 #RewriteCond %{HTTP_HOST} ^www\.example\.com$
-#RewriteRule (.*) $1 [E=TYPO3_CONTEXT:Production]
+#RewriteRule .? - [E=TYPO3_CONTEXT:Production]
 
 # Rule for versioned static files, configured through:
 # - $TYPO3_CONF_VARS['BE']['versionNumberInFilename']
-- 
GitLab