Commit 0d9973ca6813773e1c1f80249ef884a7199636f1
1 parent
03934ef0
14.06.16
Showing
1 changed file
with
54 additions
and
54 deletions
Show diff stats
.htaccess
| ... | ... | @@ -99,61 +99,61 @@ AddDefaultCharset utf-8 |
| 99 | 99 | |
| 100 | 100 | |
| 101 | 101 | # кеширование в браузере на стороне пользователя |
| 102 | -#<IfModule mod_expires.c> | |
| 103 | -#ExpiresActive On | |
| 104 | -#ExpiresDefault "access 7 days" | |
| 105 | -#ExpiresByType application/javascript "access plus 1 year" | |
| 106 | -#ExpiresByType text/javascript "access plus 1 year" | |
| 107 | -#ExpiresByType text/css "access plus 1 year" | |
| 108 | -#ExpiresByType text/html "access plus 7 day" | |
| 109 | -#ExpiresByType text/x-javascript "access 1 year" | |
| 110 | -#ExpiresByType image/gif "access plus 1 year" | |
| 111 | -#ExpiresByType image/jpeg "access plus 1 year" | |
| 112 | -#ExpiresByType image/png "access plus 1 year" | |
| 113 | -#ExpiresByType image/jpg "access plus 1 year" | |
| 114 | -#ExpiresByType image/x-icon "access 1 year" | |
| 115 | -#ExpiresByType application/x-shockwave-flash "access 1 year" | |
| 116 | -#</IfModule> | |
| 117 | -# | |
| 118 | -#<IfModule mod_deflate.c> | |
| 119 | -#AddOutputFilterByType DEFLATE text/plain | |
| 120 | -#AddOutputFilterByType DEFLATE text/html | |
| 121 | -#AddOutputFilterByType DEFLATE text/xml | |
| 122 | -#AddOutputFilterByType DEFLATE text/css | |
| 123 | -#AddOutputFilterByType DEFLATE application/xml | |
| 124 | -#AddOutputFilterByType DEFLATE application/xhtml+xml | |
| 125 | -#AddOutputFilterByType DEFLATE application/rss+xml | |
| 126 | -#AddOutputFilterByType DEFLATE application/javascript | |
| 127 | -#AddOutputFilterByType DEFLATE application/x-javascript | |
| 128 | -#BrowserMatch ^Mozilla/4 gzip-only-text/html | |
| 129 | -#BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
| 130 | -#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
| 131 | -#Header append Vary User-Agent | |
| 132 | -#RewriteEngine On | |
| 133 | -#AddEncoding gzip .gz | |
| 134 | -#RewriteCond %{HTTP:Accept-encoding} gzip | |
| 135 | -#RewriteCond %{REQUEST_FILENAME}.gz -f | |
| 136 | -#RewriteRule ^(.*)$ $1.gz [QSA,L] | |
| 137 | -#</IfModule> | |
| 102 | + | |
| 103 | +<IfModule mod_expires.c> | |
| 104 | + ExpiresActive On | |
| 105 | + ExpiresDefault "access 7 days" | |
| 106 | + ExpiresByType application/javascript "access plus 1 year" | |
| 107 | + ExpiresByType text/javascript "access plus 1 year" | |
| 108 | + ExpiresByType text/css "access plus 1 year" | |
| 109 | + ExpiresByType text/html "access plus 7 day" | |
| 110 | + ExpiresByType text/x-javascript "access 1 year" | |
| 111 | + ExpiresByType image/gif "access plus 1 year" | |
| 112 | + ExpiresByType image/jpeg "access plus 1 year" | |
| 113 | + ExpiresByType image/png "access plus 1 year" | |
| 114 | + ExpiresByType image/jpg "access plus 1 year" | |
| 115 | + ExpiresByType image/x-icon "access 1 year" | |
| 116 | + ExpiresByType application/x-shockwave-flash "access 1 year" | |
| 117 | + </IfModule> | |
| 118 | +<IfModule mod_deflate.c> | |
| 119 | +AddOutputFilterByType DEFLATE text/plain | |
| 120 | +AddOutputFilterByType DEFLATE text/html | |
| 121 | +AddOutputFilterByType DEFLATE text/xml | |
| 122 | +AddOutputFilterByType DEFLATE text/css | |
| 123 | +AddOutputFilterByType DEFLATE application/xml | |
| 124 | +AddOutputFilterByType DEFLATE application/xhtml+xml | |
| 125 | +AddOutputFilterByType DEFLATE application/rss+xml | |
| 126 | +AddOutputFilterByType DEFLATE application/javascript | |
| 127 | +AddOutputFilterByType DEFLATE application/x-javascript | |
| 128 | +BrowserMatch ^Mozilla/4 gzip-only-text/html | |
| 129 | +BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
| 130 | +BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
| 131 | +Header append Vary User-Agent | |
| 132 | +RewriteEngine On | |
| 133 | +AddEncoding gzip .gz | |
| 134 | +RewriteCond %{HTTP:Accept-encoding} gzip | |
| 135 | +RewriteCond %{REQUEST_FILENAME}.gz -f | |
| 136 | +RewriteRule ^(.*)$ $1.gz [QSA,L] | |
| 137 | +</IfModule> | |
| 138 | 138 | # Cache-Control |
| 139 | -#<ifModule mod_headers.c> | |
| 140 | -## 30 дней | |
| 141 | -#<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> | |
| 142 | -#Header set Cache-Control "max-age=2592000, public" | |
| 143 | -#</filesMatch> | |
| 144 | -## 30 дней | |
| 145 | -#<filesMatch "\.(css|js)$"> | |
| 146 | -#Header set Cache-Control "max-age=2592000, public" | |
| 147 | -#</filesMatch> | |
| 148 | -## 2 дня | |
| 149 | -#<filesMatch "\.(xml|txt)$"> | |
| 150 | -#Header set Cache-Control "max-age=172800, public, must-revalidate" | |
| 151 | -#</filesMatch> | |
| 152 | -## 1 день | |
| 153 | -#<filesMatch "\.(html|htm|php)$"> | |
| 154 | -#Header set Cache-Control "max-age=172800, private, must-revalidate" | |
| 155 | -#</filesMatch> | |
| 156 | -#</ifModule> | |
| 139 | +<ifModule mod_headers.c> | |
| 140 | + # 30 дней | |
| 141 | + <filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"> | |
| 142 | + Header set Cache-Control "max-age=2592000, public" | |
| 143 | + </filesMatch> | |
| 144 | + # 30 дней | |
| 145 | + <filesMatch "\.(css|js)$"> | |
| 146 | + Header set Cache-Control "max-age=2592000, public" | |
| 147 | + </filesMatch> | |
| 148 | + # 2 дня | |
| 149 | + <filesMatch "\.(xml|txt)$"> | |
| 150 | + Header set Cache-Control "max-age=172800, public, must-revalidate" | |
| 151 | + </filesMatch> | |
| 152 | + # 1 день | |
| 153 | + <filesMatch "\.(html|htm|php)$"> | |
| 154 | + Header set Cache-Control "max-age=172800, private, must-revalidate" | |
| 155 | + </filesMatch> | |
| 156 | +</ifModule> | |
| 157 | 157 | |
| 158 | 158 | #Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE |
| 159 | 159 | <IfModule mod_setenvif.c> | ... | ... |