[BUGFIX] Fix RewriteRule for context to avoid HTTP 500 28/30328/6
authorArmin Ruediger Vieweg <armin@v.ieweg.de>
Thu, 22 May 2014 14:07:53 +0000 (16:07 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 24 Jun 2014 15:39:46 +0000 (17:39 +0200)
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

index d1d11d4..23fa98b 100644 (file)
@@ -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']