857a9d45ca3ca7469471f30153eb0c745347b5ad
[Packages/TYPO3.CMS.git] / typo3 / .htaccess
1 <IfModule mod_rewrite.c>
2
3 RewriteEngine On
4 # Use options from the htaccess in the main directory of the frontend in order
5 # to have versioned static files and TYPO3_CONTEXT working
6 RewriteOptions inherit
7
8 # Store the current location in an environment variable CWD to use
9 # mod_rewrite in .htaccess files without knowing the RewriteBase
10 RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
11 RewriteRule ^.*$ - [E=CWD:%2]
12
13 # Block non-existing .map files, which are requested by some browsers.
14 # We need to do that this way here, because otherwise the rewrite logic
15 # of the parent folder will redirect such a request to the typo3/index.php
16 # causing the BE (login) to be returned.
17 # This is due to the nature of 'RewriteOptions inherit', which copies the rules
18 # virtually into this file (at the end) and then the defined rules, which include
19 # 'typo3/' will not match in the context of this file.
20 RewriteRule \.map$ - [F]
21
22 # Redirect install tool files
23 RewriteRule ^install(\/?.*)$ %{ENV:CWD}sysext/install/Start/Install.php [R=307,L]
24 </IfModule>