source: trunk/.htaccess @ 7619

Revision 7619, 6.6 KB checked in by wmerlotto, 11 years ago (diff)

Ticket #3191 - Removendo arquivos desnecessarios e alterando instalador para compatibiliza-lo com zpush

Line 
1#
2# Configuracoes principais
3#
4Options -ExecCGI -MultiViews -Indexes
5DirectoryIndex index.php index.html index.htm
6DefaultLanguage pt-BR
7AddDefaultCharset ISO-8859-1
8ServerSignature Off
9
10#
11# Configuracoes de "headers", cache e outras otimizacoes
12#
13# Disable caches and browsers from being able to validate files,
14# so they are forced to rely on your Cache-Control and Expires header.
15<ifModule mod_headers.c>
16        Header unset ETag
17</ifModule>
18FileETag None
19
20#-> http://www.htaccesselite.com/htaccess/cache-control-http-headers-vt65.html
21#      300   5 M
22#     2700  45 M
23#     3600   1 H
24#    54000  15 H
25#    86400   1 D
26#   518400   6 D
27#   604800   1 W
28#  1814400   3 W
29#  2419200   1 M
30# 26611200  11 M
31# 29030400   1 Y (never expire)
32
33## HEADER CACHING ##
34#-> http://www.htaccesselite.com/htaccess/caching-using-header-vt2.html
35#<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$">
36#       Header set Cache-Control "max-age=2592000"
37#</FilesMatch>
38#<FilesMatch "\.(js|css|pdf|swf)$">
39#   Header set Cache-Control "max-age=604800"
40#</FilesMatch>
41#<FilesMatch "\.(html|htm|txt)$">
42#   Header set Cache-Control "max-age=600"
43#</FilesMatch>
44#<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
45#   Header unset Cache-Control
46#</FilesMatch>
47
48## ALTERNATE EXPIRES CACHING ##
49#-> htaccesselite.com/d/use-htaccess-to-speed-up-your-site-discussion-vt67.html
50#<ifModule mod_expires.c>
51#       ExpiresActive On
52#       ExpiresDefault A0
53#       ExpiresDefault "access plus 1 day"
54        # Permite que os arquivos sejam "cacheados" tanto para http quanto para https
55#       Header set Cache-Control "public"
56
57#       ExpiresByType text/html "access plus 1 hour"
58#       ExpiresByType text/plain "access plus 1 hour"
59#       ExpiresByType text/css "access plus 1 hour"
60#       ExpiresByType text/javascript "access plus 1 hour"
61#       ExpiresByType application/x-javascript "access plus 1 hour"
62
63#       ExpiresByType image/gif "access plus 1 week"
64#       ExpiresByType image/jpg "access plus 1 week"
65#       ExpiresByType image/png "access plus 1 week"
66
67        #<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
68                #ExpiresActive Off
69                # Sem cache!
70                #ExpiresDefault A0
71                #Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
72                #Header set Pragma "no-cache"
73        #</FilesMatch>
74#</ifModule>
75
76#
77# Compactacao
78#
79<IfModule mod_deflate.c>
80        SetOutputFilter DEFLATE
81
82        AddOutputFilterByType DEFLATE application/x-httpd-php
83        AddOutputFilterByType DEFLATE application/x-javascript
84        AddOutputFilterByType DEFLATE application/x-httpd-fastphp
85        AddOutputFilterByType DEFLATE application/xhtml+xml
86        AddOutputFilterByType DEFLATE application/xml
87        AddOutputFilterByType DEFLATE application/rss+xml
88        AddOutputFilterByType DEFLATE application/atom_xml
89        AddOutputFilterByType DEFLATE text/html
90        AddOutputFilterByType DEFLATE text/plain
91        AddOutputFilterByType DEFLATE text/xml
92        AddOutputFilterByType DEFLATE text/css
93        AddOutputFilterByType DEFLATE image/svg+xml
94
95        # Use low settings for compression to make sure impact on server is low
96        #DeflateMemLevel 2
97        #Highest 9 - Lowest 1
98        #DeflateCompressionLevel 9
99
100        #Skip browsers with known problems
101        BrowserMatch ^Mozilla/4 gzip-only-text/html
102        BrowserMatch ^Mozilla/4\.0[678] no-gzip
103        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
104
105        # properly handle requests coming from behind proxies
106        <IfModule mod_headers.c>
107                # Make sure proxies don't deliver the wrong content
108                Header append Vary User-Agent env=!dont-vary
109        </IfModule>
110
111        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
112        SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
113        SetEnvIfNoCase Request_URI \.(?:avi|mov|mp3|ogg|wmv|wma)$ no-gzip dont-vary
114        SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
115
116        # Log file compression
117#       DeflateFilterNote Input instream
118#       DeflateFilterNote Output outstream
119#       DeflateFilterNote Ratio ratio
120#       LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
121#       CustomLog /var/log/apache2/deflate.log deflate
122
123</ifModule>
124
125
126#
127# Reescritas e redirecionamentos
128#
129RewriteEngine On
130## DENY REQUEST BASED ON REQUEST METHOD ##
131RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|HEAD)$ [NC]
132RewriteRule ^.*$ - [F]
133RewriteRule ^rest(.*)$ prototype/rest/$1 [QSA,L]
134RewriteRule ^Microsoft-Server-ActiveSync(.*) zpush/index.php$1 [E=ACTIVESYNC:true,E=REMOTE_USER:%{HTTP:Authorization}]
135
136#
137# Seguranca e restricoes de acesso
138#
139# Ao próprio htaccess e outros arquivos sensiveis (como senhas)
140<Files ~ "\.(htaccess|htpasswd|ini|srv|log|sh|svn)$">
141        Order Allow,Deny
142        Deny from all
143        Satisfy any
144</Files>
145
146#<Location /setup>
147#       Options None
148#        Order deny,allow
149#       # Sua rede local
150#        allow from 192.168.0.0/24
151#</Location>
152
153#
154# Configuracoes do PHP para o Expresso
155# IMPORTANTE: estas configurações não serão carregadas
156#  em ambientes que executam o PHP via FastCGI, FPM,
157#  ou similares. Nestes casos, estas configurações
158#  devem ser adicionadas diretamente ao php.ini.
159#
160<IfModule mod_php5.c>
161        # Configuracoes de sessao
162        php_flag session.auto_start Off
163        php_flag session.use_cookies Off
164        # Uses dir as a session handler
165        php_value session.save_handler "files"
166        php_value session.save_path "/dev/shm"
167        # Use memcache as a session handler
168        #php_value session.save_handler "memcache"
169        #php_value session.save_path "tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
170        php_value session.serialize_handler "php"
171        php_value session.gc_probability 1
172        php_value session.gc_divisor 100
173        php_value session.gc_maxlifetime 14400
174        php_value session.cache_limiter nocache
175        php_value session.cache_expire 180
176        php_flag session.use_trans_sid Off
177
178        php_flag short_open_tag On
179        php_flag zlib.output_compression Off
180        php_flag output_buffering Off
181        php_flag register_argc_argv On
182        php_flag allow_url_include Off
183        php_value variables_order "EGPCS"
184        php_value default_charset "iso-8859-1"
185        php_value default_mimetype "text/html"
186        php_value date.timezone "America/Sao_Paulo"
187        php_value url_rewriter.tags "a=href,area=href,frame=src,form=,fieldset="
188        #php_value url_rewriter.tags "a=href,area=href,frame=src,input=src,form=,fieldset="
189
190        php_value mbstring.func_overload "0"
191        #php_value mbstring.func_overload "7"
192        #php_flag mbstring.strict_detection On
193
194        php_value max_execution_time 90
195        php_value max_input_time 120
196        php_value memory_limit 196M
197        php_value post_max_size 50M
198        php_value upload_max_filesize 40M
199
200        # Para ambiente de desenvolvimento
201        #php_flag log_errors On
202        #php_value error_reporting "E_ALL & ~E_NOTICE"
203        #php_flag ignore_repeated_errors On
204        #php_flag report_memleaks On
205        #php_flag html_errors On
206        #php_value error_log /tmp/php.log
207
208        # deprecate 5.3.0, removed 5.4.0
209        php_flag magic_quotes_gpc Off
210        php_flag magic_quotes_runtime Off
211        php_flag register_globals Off
212        php_flag register_long_arrays Off
213        php_flag allow_call_time_pass_reference On
214        php_flag session.bug_compat_42 0
215        php_flag session.bug_compat_warn 0
216</IfModule>
Note: See TracBrowser for help on using the repository browser.