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