.htaccess 1.03 KB
Newer Older
1
2
3
<IfModule mod_rewrite.c>

	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
9
10
11
12

	# Store the current location in an environment variable CWD to use
	# mod_rewrite in .htaccess files without knowing the RewriteBase
	RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
	RewriteRule ^.*$ - [E=CWD:%2]

13
14
15
16
17
18
19
20
21
	# Block non-existing .map files, which are requested by some browsers.
	# We need to do that this way here, because otherwise the rewrite logic
	# of the parent folder will redirect such a request to the typo3/index.php
	# causing the BE (login) to be returned.
	# This is due to the nature of 'RewriteOptions inherit', which copies the rules
	# virtually into this file (at the end) and then the defined rules, which include
	# 'typo3/' will not match in the context of this file.
	RewriteRule \.map$ - [F]

22
23
	# Redirect install tool files
	RewriteRule ^install(\/?.*)$ %{ENV:CWD}sysext/install/Start/Install.php [R=307,L]
24
</IfModule>