Fixed bug #14532: SpriteIcons: Clickmenu is not replaced (Thanks to Steffen Ritter)
[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 RewriteCond %{REQUEST_FILENAME} !-f
73 RewriteCond %{REQUEST_FILENAME} !-d
74 RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
75
76 # Stop rewrite processing if we are in the typo3/ directory
77 # For httpd.conf, use this line instead of the next one:
78 # RewriteRule ^/TYPO3root/(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
79 RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
80
81 # Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
82 # and stop the rewrite processing
83 # For httpd.conf, use this line instead of the next one:
84 # RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
85 RewriteRule ^typo3$ typo3/index_re.php [L]
86
87 # If the file/symlink/directory does not exist => Redirect to index.php
88 # Important note: If you copy/paste this into httpd.conf instead
89 # of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
90 # '%{REQUEST_FILENAME}' part.
91 RewriteCond %{REQUEST_FILENAME} !-f
92 RewriteCond %{REQUEST_FILENAME} !-d
93 RewriteCond %{REQUEST_FILENAME} !-l
94
95 # Main URL rewriting.
96
97 # If you use Windows and SimulateStaticDocuments do not work, try adding a
98 # slash (/) right before 'index.php' below.
99
100 # The example shows how to rewrite only *.html and *.pdf files to index.php
101 # This may be helpful when using an extension that can generate PDF files
102 # on the fly.
103 # Example: RewriteRule .*\.(html|pdf)$ index.php [L]
104
105 # For httpd.conf, use this line instead of the next one that has no '#':
106 # RewriteRule .* /TYPO3root/index.php [L]
107
108 # For use with the RealUrl extension, you might need to remove the
109 # RewriteBase directive somewhere above and use this line instead of the
110 # next one:
111 # RewriteRule .* /index.php [L]
112
113 RewriteRule .* index.php [L]
114
115 ### End: Rewrite stuff ###
116
117 ### Begin: PHP optimisation ###
118
119 # All features below are left to the default if you don't change this.
120 # Simply remove the comment marks if you want to use some/all of these
121 # settings
122
123 # The PHP developers recommend disabling this feature. Do that.
124 # It's deprecated and is likely to be unsupported in future versions of PHP.
125 #php_flag allow_call_time_pass_reference off
126
127 # TYPO3 works fine with register_globals turned off.
128 # This is highly recommended!
129 #php_flag register_globals off
130
131 # PHP may not declare the argv & argc variables (that would contain the GET
132 # information).
133 # TYPO3 doesn't need this, so just turn it off.
134 #php_flag register_argc_argv off
135
136 # Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
137 #php_flag magic_quotes_gpc off
138
139 # Order in which PHP registers GET, POST, Cookie and Built-in variables
140 #php_value variables_order GPCS
141
142 ### End: PHP optimisation ###
143
144 ### Begin: Miscellaneous ###
145
146 # Make sure that directory listings are disabled
147 #Options -Indexes
148
149 # There is a problem with Internet Explorer and mod_gzip on Apache servers.
150 # For more information, see
151 # http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
152 #mod_gzip_item_exclude file \.css$
153 #mod_gzip_item_exclude file \.png$
154 #mod_gzip_item_exclude file \.gif$
155 #mod_gzip_item_exclude file \.jpg$
156 #mod_gzip_item_exclude file \.jpeg$
157 #mod_gzip_item_exclude file \.js$
158
159 ### End: Miscellaneous ###
160
161 # Add your own rules here
162 # ...