From a627f6470391ca5d8f1cdfae75be6f282c6794ed Mon Sep 17 00:00:00 2001
From: Ernesto Baschny <ernst@cron-it.de>
Date: Tue, 24 Aug 2010 14:28:08 +0000
Subject: [PATCH] Fixed bug #15108: .htaccess cleanups and description in the
 Install Tool (thanks to Markus Klein)

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8683 709f56b5-9817-0410-a4d7-c38de5d9e867
---
 ChangeLog                | 4 ++++
 INSTALL.txt              | 5 +++++
 misc/advanced.htaccess   | 8 +++++---
 misc/simple.htaccess     | 4 ----
 t3lib/config_default.php | 4 ++--
 5 files changed, 16 insertions(+), 9 deletions(-)
 delete mode 100755 misc/simple.htaccess

diff --git a/ChangeLog b/ChangeLog
index 4318a1f0b9ff..3711a10e9944 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-24  Ernesto Baschny  <ernst@cron-it.de>
+
+	* Fixed bug #15108: .htaccess cleanups and description in the Install Tool (thanks to Markus Klein)
+
 2010-08-24  Xavier Perseguers  <typo3@perseguers.ch>
 
 	* Added feature #15542: Frontend rendering should use prepared queries (1st step)
diff --git a/INSTALL.txt b/INSTALL.txt
index be7daaecc728..229adbd2d74f 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -203,6 +203,11 @@ A:	Make sure that AllowOverride allows "Indexes" and "FileInfo" in the Apache
 	/var/log/httpd. Check with your hosting provider if you are in doubt where
 	the logs are located.
 
+Q:	Backend or Installer looks strange, no images just black and white?
+A:	Maybe you missed some configuration in your .htaccess file.
+	Have a look at typo3_src/misc/advanced.htaccess to find the options
+	you might need.
+
 Q:	I went through the setup process and created an admin user. Why can't I log
 	in now?
 A:	If you use MySQL 5.x or newer, try setting it to "compatible" mode. Open the
diff --git a/misc/advanced.htaccess b/misc/advanced.htaccess
index 8043f050f02a..13ba0d89d72f 100644
--- a/misc/advanced.htaccess
+++ b/misc/advanced.htaccess
@@ -68,15 +68,17 @@ RewriteEngine On
 # If you place this in httpd.conf, you cannot use this directive in any case!
 #RewriteBase /
 
-# Rule for versioned static files (see $TYPO3_CONF_VARS[BE][versionNumberInFilename])
+# Rule for versioned static files (see $TYPO3_CONF_VARS[BE][versionNumberInFilename]
+# and $TYPO3_CONF_VARS[FE][versionNumberInFilename])
+# IMPORTANT: This rule has to be the very first rule in order to work! 
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
 
 # Stop rewrite processing if we are in the typo3/ directory
 # For httpd.conf, use this line instead of the next one:
-# RewriteRule ^/TYPO3root/(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
-RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
+# RewriteRule ^/TYPO3root/(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
+RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
 
 # Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
 # and stop the rewrite processing
diff --git a/misc/simple.htaccess b/misc/simple.htaccess
deleted file mode 100755
index 6564f5213df8..000000000000
--- a/misc/simple.htaccess
+++ /dev/null
@@ -1,4 +0,0 @@
-RewriteEngine On
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule   ^typo3$  typo3/index_re.php
-RewriteRule   ^[^/]*\.html$  index.php
diff --git a/t3lib/config_default.php b/t3lib/config_default.php
index e8d9ff5908e2..8764bc9fd093 100644
--- a/t3lib/config_default.php
+++ b/t3lib/config_default.php
@@ -262,7 +262,7 @@ $TYPO3_CONF_VARS = array(
 		'flexformForceCDATA' => 0,				// Boolean:  If set, will add CDATA to Flexform XML. Some versions of libxml have a bug that causes HTML entities to be stripped from any XML content and this setting will avoid the bug by adding CDATA.
 		'explicitConfirmationOfTranslation' => FALSE,	// If set, then the diff-data of localized records is not saved automatically when updated but requires that a translator clicks the special finish_translation/save/close button that becomes available.
 		'elementVersioningOnly' => TRUE,		// If true, only element versioning is allowed in the backend (see option newPagesVersioningType). Setting this flag is recommended for new installations of TYPO3 4.2+ since "page" and "branch" versioning types are known for the drawbacks of loosing ids and "element" type versions supports moving now. Please note that "page" and "branch" types are deprecated since TYPO3 4.2 and will be unsupported in TYPO3 4.6. Thus, this option will be removed in TYPO3 4.6.
-		'versionNumberInFilename' => FALSE,	// <p>Boolean: If true, included CSS and JS files will have the timestamp embedded in the filename, ie. filename.1269312081.js. This will make browsers and proxies reload the files if they change (thus avoiding caching issues). IMPORTANT: this feature requires this .htaccess rule to work:</p><pre>RewriteCond %{REQUEST_FILENAME} !-f<br/>RewriteCond %{REQUEST_FILENAME} !-d<br/>RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]</pre><p>If false the filemtime will be appended as a query-string.</p>
+		'versionNumberInFilename' => FALSE,	// <p>Boolean: If true, included CSS and JS files will have the timestamp embedded in the filename, ie. filename.1269312081.js. This will make browsers and proxies reload the files if they change (thus avoiding caching issues). IMPORTANT: this feature requires extra .htaccess rules to work (please refer to misc/advanced.htaccess or the _.htaccess file from the dummy package)</p><p>If false the filemtime will be appended as a query-string.</p>
 		'spriteIconGenerator_handler' => '',	// String: Used to register own/other spriteGenerating Handler, they have to implement the interface t3lib_spritemanager_SpriteIconGenerator
 		'allowDonateWindow' => TRUE,			// Boolean: Defines whether to display a TYPO3 donate window to admin users that have been working with the system for more than three months.
 		'AJAX' => array(				// array of key-value pairs for a unified use of AJAX calls in the TYPO3 backend. Keys are the unique ajaxIDs where the value will be resolved to call a method in an object. See ajax.php and the classes/class.typo3ajax.php for more information.
@@ -347,7 +347,7 @@ $TYPO3_CONF_VARS = array(
 		'eID_include' => array(),				// Array of key/value pairs where key is "tx_[ext]_[optional suffix]" and value is relative filename of class to include. Key is used as "?eID=" for index_ts.php to include the code file which renders the page from that point. (Useful for functionality that requires a low initialization footprint, eg. frontend ajax applications)
 		'disableNoCacheParameter' => FALSE,		// Boolean: If set, the no_cache request parameter will become ineffective. This is currently still an experimental feature and will require a website only with plugins that don't use this parameter. However, using "&amp;no_cache=1" should be avoided anyway because there are better ways to disable caching for a certain part of the website (see COA_INT/USER_INT documentation in TSref).
 		'workspacePreviewLogoutTemplate' => '',	// If set, points to an HTML file relative to the TYPO3_site root which will be read and outputted as template for this message. Example: fileadmin/templates/template_workspace_preview_logout.html. Inside you can put the marker %1$s to insert the URL to go back to. Use this in &lt;a href="%1$s"&gt;Go back...&lt;/a&gt; links
-		'versionNumberInFilename' => 'querystring',	// String: embed,querystring,''. Allows to automatically include a version number (timestamp of the file) to referred CSS and JS filenames on the rendered page. This will make browsers and proxies reload the files if they change (thus avoiding caching issues). Set to 'embed' will have the timestamp embedded in the filename, ie. filename.1269312081.js. IMPORTANT: 'embed' requires this .htaccess rule to work:<pre>RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif)$ $1.$3 [L]</pre><p>Set to 'querystring' (default setting) to append the version number as a query parameter (doesn't require mod_rewrite). Set to '' will turn this functionality off (behaves like TYPO3 &lt; v4.4).</p>
+		'versionNumberInFilename' => 'querystring',	// String: embed,querystring,''. Allows to automatically include a version number (timestamp of the file) to referred CSS and JS filenames on the rendered page. This will make browsers and proxies reload the files if they change (thus avoiding caching issues). Set to 'embed' will have the timestamp embedded in the filename, ie. filename.1269312081.js. IMPORTANT: 'embed' requires extra .htaccess rules to work (please refer to misc/advanced.htaccess or the _.htaccess file from the dummy package)<p>Set to 'querystring' (default setting) to append the version number as a query parameter (doesn't require mod_rewrite). Set to '' will turn this functionality off (behaves like TYPO3 &lt; v4.4).</p>
 		'XCLASS' => array(),					// See 'Inside TYPO3' document for more information.
 	),
 	'MODS' => array(		// Backend Module Configuration (obsolete, make extension instead)
-- 
GitLab