Changeset 5419 for trunk/.htaccess
- Timestamp:
- 01/25/12 10:40:13 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.htaccess
r5316 r5419 1 # 2 # Configuracoes principais 3 # 4 Options -ExecCGI -MultiViews -Indexes 5 DirectoryIndex index.php index.html index.htm 6 DefaultLanguage pt-BR 7 AddDefaultCharset ISO-8859-1 8 ServerSignature 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> 18 FileETag 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 "access plus 1 day" 53 # Permite que os arquivos sejam "cacheados" tanto para http quanto para https 54 # Header set Cache-Control "public" 55 56 # ExpiresByType text/html "access plus 1 hour" 57 # ExpiresByType text/plain "access plus 1 hour" 58 # ExpiresByType text/css "access plus 1 hour" 59 # ExpiresByType text/javascript "access plus 1 hour" 60 # ExpiresByType application/x-javascript "access plus 1 hour" 61 62 # ExpiresByType image/gif "access plus 1 week" 63 # ExpiresByType image/jpg "access plus 1 week" 64 # ExpiresByType image/png "access plus 1 week" 65 66 #<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> 67 #ExpiresActive Off 68 #</FilesMatch> 69 #</ifModule> 70 71 # 72 # Compactacao 73 # 74 <IfModule mod_deflate.c> 75 SetOutputFilter DEFLATE 76 77 AddOutputFilterByType DEFLATE application/x-httpd-php 78 AddOutputFilterByType DEFLATE application/x-javascript 79 AddOutputFilterByType DEFLATE application/x-httpd-fastphp 80 AddOutputFilterByType DEFLATE application/xhtml+xml 81 AddOutputFilterByType DEFLATE application/xml 82 AddOutputFilterByType DEFLATE application/rss+xml 83 AddOutputFilterByType DEFLATE application/atom_xml 84 AddOutputFilterByType DEFLATE text/html 85 AddOutputFilterByType DEFLATE text/plain 86 AddOutputFilterByType DEFLATE text/xml 87 AddOutputFilterByType DEFLATE text/css 88 AddOutputFilterByType DEFLATE image/svg+xml 89 90 # Use low settings for compression to make sure impact on server is low 91 #DeflateMemLevel 2 92 #Highest 9 - Lowest 1 93 #DeflateCompressionLevel 9 94 95 #Skip browsers with known problems 96 BrowserMatch ^Mozilla/4 gzip-only-text/html 97 BrowserMatch ^Mozilla/4\.0[678] no-gzip 98 BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 99 100 # properly handle requests coming from behind proxies 101 <IfModule mod_headers.c> 102 # Make sure proxies don't deliver the wrong content 103 Header append Vary User-Agent env=!dont-vary 104 </IfModule> 105 106 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary 107 SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary 108 SetEnvIfNoCase Request_URI \.(?:avi|mov|mp3|ogg|wmv|wma)$ no-gzip dont-vary 109 SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary 110 111 # Log file compression 112 # DeflateFilterNote Input instream 113 # DeflateFilterNote Output outstream 114 # DeflateFilterNote Ratio ratio 115 # LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate 116 # CustomLog /var/log/apache2/deflate.log deflate 117 118 </ifModule> 119 120 121 # 122 # Reescritas e redirecionamentos 123 # 124 RewriteEngine On 125 ## DENY REQUEST BASED ON REQUEST METHOD ## 126 RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)$ [NC] 127 RewriteRule ^.*$ - [F] 128 129 # 130 # Seguranca e restricoes de acesso 131 # 132 # Ao próprio htaccess e outros arquivos sensiveis (como senhas) 133 <Files ~ "\.(htaccess|htpasswd|ini|srv|log|sh|svn)$"> 134 Order Allow,Deny 135 Deny from all 136 Satisfy any 137 </Files> 138 139 #<Location /setup> 140 # Options None 141 # Order deny,allow 142 # # Sua rede local 143 # allow from 192.168.0.0/24 144 #</Location> 145 146 # 1 147 # Configuracoes do PHP para o Expresso 148 # 149 php_value expose_php Off 2 150 php_value short_open_tag On 3 151 php_value zlib.output_compression Off … … 16 164 php_value url_rewriter.tags "a=href,area=href,frame=src,input=src,form=,fieldset=" 17 165 18 #php_value session.auto_start 1 19 php_value session.use_cookies 1166 php_value session.auto_start 0 167 php_value session.use_cookies 0 20 168 # Uses dir as a session handler 21 #php_value session.save_handler "files"22 #php_value session.save_path "/var/lib/php/session"169 php_value session.save_handler "files" 170 php_value session.save_path "/var/lib/php/session" 23 171 #php_value session.save_path "/dev/shm" 24 172 # Use memcache as a session handler 25 ##php_value session.save_handler "memcache" 26 # Defines a comma separated of server urls to use for session storage 27 ##php_value session.save_path "tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15" 173 #php_value session.save_handler "memcache" 174 #php_value session.save_path "tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15" 28 175 php_value session.serialize_handler php 29 176 php_value session.gc_probability 1 … … 54 201 #php_value html_errors On 55 202 #php_value error_log /dev/shm/php.log 56 57 #RewriteEngine On58 #RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)59 #RewriteRule .* - [F]
Note: See TracChangeset
for help on using the changeset viewer.