source: trunk/.htaccess @ 6399

Revision 6028, 3.4 KB checked in by vain, 3 months ago (diff)
  • added types (flv|eot|woff|svg|ttf) to htaccess
  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Author Id Revision HeadURL
  • Property svn:mime-type set to text/plain
Line 
1# This is a ".htaccess" template for Clansuite
2# SVN: $Id$
3
4# Don't show directory listings for URLs which map to a directory.
5DirectoryIndex index.php
6# Follow symbolic links in this directory.
7Options +FollowSymLinks
8Options -Indexes
9SetEnv TZ Europe/Berlin
10
11<IfModule mod_rewrite.c>
12    RewriteEngine on
13    # rewrite "www.domain.com -> domain.com"
14    #RewriteCond %{HTTPS} !=on
15    #RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
16    #RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
17
18    RewriteCond %{REQUEST_FILENAME} !-f
19    RewriteCond %{REQUEST_FILENAME} !-d
20    RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php [QSA,L]
21
22</IfModule>
23
24# disable direct access to database, config, text, log and template files
25<FilesMatch "\.(txt|log|tpl|sql|xml|ini)$">
26order allow,deny
27deny from all
28</FilesMatch>
29
30<IfModule mod_php5.c>
31    php_value magic_quotes_runtime  "0"
32    php_value magic_quotes_gpc      "0"
33    php_value register_globals      "Off"
34    php_value output_buffering      "1"
35    php_value output_handler        ob_gzhandler
36</IfModule>
37
38<IfModule mod_deflate.c>
39    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json
40    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
41    SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
42    # webfonts and svg:
43    <FilesMatch "\.(ttf|otf|eot|svg)$" >
44        SetOutputFilter DEFLATE
45    </FilesMatch>
46    # Netscape 4.x problems...
47    BrowserMatch ^Mozilla/4 gzip-only-text/html
48    # Netscape 4.06-4.08 problems
49    BrowserMatch ^Mozilla/4\.0[678] no-gzip
50    # MSIE masquerades as Netscape, but it is fine
51    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
52    # ensure proxies don't deliver the wrong content
53    Header append Vary User-Agent env=!dont-vary
54</IfModule>
55
56<IfModule mod_expires.c>
57    Header set cache-control: public
58    <FilesMatch "\.(ico|gif|jpg|jpeg|png|swf|flv|eot|woff|svg|ttf|css|js|html?|xml|txt)$">
59        ExpiresActive On
60        ExpiresDefault "access plus 1 years"
61    </FilesMatch>
62</IfModule>
63
64<IfModule mod_headers.c>
65    # Force use of Chromium Render Engine if IE
66    BrowserMatch MSIE ie
67    Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
68
69    # inform proxies that content changes based on user agent
70    Header append Vary User-Agent
71
72    # do not serve cross domain ajax
73    # code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
74    Header set Access-Control-Allow-Origin "*"
75
76    Header unset ETag
77    Header unset Last-Modified
78</IfModule>
79<FilesMatch "\.(ico|gif|jpg|jpeg|png|swf|flv|eot|woff|svg|ttf|css|js|html?|xml|txt)$">
80    FileETag none
81</FilesMatch>
82
83<IfModule mod_gzip.c>
84    mod_gzip_on Yes
85    mod_gzip_dechunk Yes
86    mod_gzip_item_include file \.(html?|txt|xml|css|js|php|pl|gif|jpg|jpeg|png|swf|flv|eot|woff|svg|ttf)$
87    mod_gzip_item_include handler ^cgi-script$
88    mod_gzip_item_include mime ^text/.*
89    mod_gzip_item_include mime ^application/x-javascript.*
90    mod_gzip_item_exclude mime ^image/.*
91    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
92</IfModule>
93
94# (11) If you have trouble uploading larger files, increase the maximum file size.
95#
96#<IfModule mod_php5.c>
97#    php_value upload_max_filesize -1
98#    php_value post_max_size 512M
99#    php_value memory_limit -1
100#    php_value max_input_time -1
101#    php_value max_execution_time 0
102#    php_value error_reporting 5
103#</IfModule>
Note: See TracBrowser for help on using the repository browser.