#15711: Render ModuleMenu with ExtJs, remove the frameset
[Packages/TYPO3.CMS.git] / misc / advanced.htaccess
1 #####
2 #
3 # Example .htaccess file
4 #
5 # This file contains a collection of almost everything you will need
6 # for optimising TYPO3:
7 #
8 # - mod_rewrite (used for SimulateStaticDocuments, RealUrl, etc.)
9 # - PHP optimisation
10 #
11 # If you want to use it, you'll need to rename this file to '.htaccess'.
12 # (To make this work you will need to adjust the 'AllowOverride'
13 # directive in your Apache configuration file.)
14 #
15 # IMPORTANT: You may need to change this file depending on your TYPO3
16 # installation!
17 #
18 # You should change every occurance of TYPO3root/ to the location where you
19 # have your website in. For example:
20 # If you have your website located at http://mysite.com/
21 # then your TYPO3root/ is just empty (remove 'TYPO3root/')
22 # If you have your website located at http://mysite.com/some/path/
23 # then your TYPO3root/ is some/path/ (search and replace)
24 #
25 # If you have problems with this file, try using the minimal
26 # mod_rewrite.htaccess which is located in the typo3_src/misc/
27 # directory of this installation.
28 #
29 # You can also use this configuration in your httpd.conf, but you'll have
30 # to modify some lines, see the comments (search for 'httpd.conf')
31 #
32 # Using rewriting in your httpd.conf is much faster, btw.
33 #
34 # Questions about this file go to the matching Install mailing list,
35 # see http://typo3.org/documentation/mailing-lists/
36 #
37 ####
38
39 ##
40 # Compressed .js and .css files
41 ##
42 # uncomment the following lines if you use compression
43 #
44 #<FilesMatch "\.js\.gzip$">
45 # AddType "text/javascript" .gzip
46 #</FilesMatch>
47 #<FilesMatch "\.css\.gzip$">
48 # AddType "text/css" .gzip
49 #</FilesMatch>
50 #AddEncoding gzip .gzip
51
52
53 ### Begin: Rewrite stuff ###
54
55 # Enable URL rewriting
56 RewriteEngine On
57
58 # To assist in debugging rewriting, you could use these lines
59 # DON'T enable it for production!
60 # This will only work in httpd.conf, not in .htaccess files
61 #RewriteLog /var/log/apache/rewrite.log
62 #RewriteLogLevel 9
63
64 # If you use the RealUrl extension, then you'll have to enable the next line.
65 # You will have to change this path if your TYPO3 installation is located
66 # in a subdirectory of the website root.
67 #
68 # If you place this in httpd.conf, you cannot use this directive in any case!
69 #RewriteBase /
70
71 # Rule for versioned static files (see $TYPO3_CONF_VARS[BE][versionNumberInFilename]
72 # and $TYPO3_CONF_VARS[FE][versionNumberInFilename])
73 # IMPORTANT: This rule has to be the very first rule in order to work!
74 RewriteCond %{REQUEST_FILENAME} !-f
75 RewriteCond %{REQUEST_FILENAME} !-d
76 RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
77
78 # Stop rewrite processing if we are in the typo3/ directory
79 # For httpd.conf, use this line instead of the next one:
80 # RewriteRule ^/TYPO3root/(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
81 RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
82
83 # Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
84 # and stop the rewrite processing
85 # For httpd.conf, use this line instead of the next one:
86 # RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
87 RewriteRule ^typo3$ typo3/index_re.php [L]
88
89 # If the file/symlink/directory does not exist => Redirect to index.php
90 # Important note: If you copy/paste this into httpd.conf instead
91 # of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
92 # '%{REQUEST_FILENAME}' part.
93 RewriteCond %{REQUEST_FILENAME} !-f
94 RewriteCond %{REQUEST_FILENAME} !-d
95 RewriteCond %{REQUEST_FILENAME} !-l
96
97 # Main URL rewriting.
98
99 # If you use Windows and SimulateStaticDocuments do not work, try adding a
100 # slash (/) right before 'index.php' below.
101
102 # The example shows how to rewrite only *.html and *.pdf files to index.php
103 # This may be helpful when using an extension that can generate PDF files
104 # on the fly.
105 # Example: RewriteRule .*\.(html|pdf)$ index.php [L]
106
107 # For httpd.conf, use this line instead of the next one that has no '#':
108 # RewriteRule .* /TYPO3root/index.php [L]
109
110 # For use with the RealUrl extension, you might need to remove the
111 # RewriteBase directive somewhere above and use this line instead of the
112 # next one:
113 # RewriteRule .* /index.php [L]
114
115 RewriteRule .* index.php [L]
116
117 ### End: Rewrite stuff ###
118
119 ### Begin: PHP optimisation ###
120
121 # All features below are left to the default if you don't change this.
122 # Simply remove the comment marks if you want to use some/all of these
123 # settings
124
125 # The PHP developers recommend disabling this feature. Do that.
126 # It's deprecated and is likely to be unsupported in future versions of PHP.
127 #php_flag allow_call_time_pass_reference off
128
129 # TYPO3 works fine with register_globals turned off.
130 # This is highly recommended!
131 #php_flag register_globals off
132
133 # PHP may not declare the argv & argc variables (that would contain the GET
134 # information).
135 # TYPO3 doesn't need this, so just turn it off.
136 #php_flag register_argc_argv off
137
138 # Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
139 #php_flag magic_quotes_gpc off
140
141 # Order in which PHP registers GET, POST, Cookie and Built-in variables
142 #php_value variables_order GPCS
143
144 ### End: PHP optimisation ###
145
146 ### Begin: Miscellaneous ###
147
148 # Make sure that directory listings are disabled
149 #Options -Indexes
150
151 # There is a problem with Internet Explorer and mod_gzip on Apache servers.
152 # For more information, see
153 # http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
154 #mod_gzip_item_exclude file \.css$
155 #mod_gzip_item_exclude file \.png$
156 #mod_gzip_item_exclude file \.gif$
157 #mod_gzip_item_exclude file \.jpg$
158 #mod_gzip_item_exclude file \.jpeg$
159 #mod_gzip_item_exclude file \.js$
160
161 ### End: Miscellaneous ###
162
163 # Add your own rules here
164 # ...