[TASK] Move arguments to initializeArguments() in PageVH in ext:fluid
[Packages/TYPO3.CMS.git] / _.htaccess
index 725ded7..821fe98 100644 (file)
                </IfModule>
        </IfModule>
 
-       # Compress all output labeled with one of the following media types
+       # Compress all output labeled with one of the following media types.
+       #
+       # (!) For Apache versions below version 2.3.7 you don't need to
+       # enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
+       # and `</IfModule>` lines as `AddOutputFilterByType` is still in
+       # the core directives.
+       #
+       # https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
+
        <IfModule mod_filter.c>
                AddOutputFilterByType DEFLATE application/atom+xml \
                        application/javascript \
@@ -265,7 +273,7 @@ AddDefaultCharset utf-8
        #RewriteCond %{HTTP_HOST} ^staging\.example\.com$
        #RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging]
        #RewriteCond %{HTTP_HOST} ^www\.example\.com$
-       RewriteRule .? - [E=TYPO3_CONTEXT:Production]
+       #RewriteRule .? - [E=TYPO3_CONTEXT:Production]
 
        # Rule for versioned static files, configured through:
        # - $GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename']
@@ -273,15 +281,17 @@ AddDefaultCharset utf-8
        # IMPORTANT: This rule has to be the very first RewriteCond in order to work!
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
-       RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
+       RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ %{ENV:CWD}$1.$3 [L]
 
        # Access block for folders
        RewriteRule _(?:recycler|temp)_/ - [F]
        RewriteRule fileadmin/templates/.*\.(?:txt|ts)$ - [F]
-       RewriteRule typo3temp/logs/ - [F]
-       RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext|typo3/vendor)/[^/]+/(?:Configuration|Resources/Private|Tests?)/ - [F]
+       RewriteRule ^(?:vendor|typo3_src|typo3temp/var) - [F]
+       RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ - [F]
 
-       # Access block for files or folders starting with a dot
+       # Block access to all hidden files and directories with the exception of
+       # the visible content from within the `/.well-known/` hidden directory (RFC 5785).
+       RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
        RewriteCond %{SCRIPT_FILENAME} -d [OR]
        RewriteCond %{SCRIPT_FILENAME} -f
        RewriteRule (?:^|/)\. - [F]
@@ -314,6 +324,11 @@ AddDefaultCharset utf-8
        </IfModule>
 </FilesMatch>
 
+# Block access to vcs directories
+<IfModule mod_alias.c>
+       RedirectMatch 404 /\.(?:git|svn|hg)/
+</IfModule>
+
 ### End: Rewriting and Access ###