Помощь Add Expires headers
-
Доброго времени суток! Помогите пожалуйста исправить ошибку «Add Expires headers». Почитал статьи,добавил код,но видимо неправильно что-то.Ниже мой код htaccess:
# BEGIN LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## <IfModule LiteSpeed> RewriteEngine on CacheLookup on RewriteRule .* - [E=Cache-Control:no-autoflush] ### marker CACHE RESOURCE start ### RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600] ### marker CACHE RESOURCE end ### ### marker FAVICON start ### RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400] ### marker FAVICON end ### ### marker CORS start ### <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font\.css)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch> ### marker CORS end ### ### marker WEBP start ### RewriteCond %{HTTP_ACCEPT} "image/webp" [or] RewriteCond %{HTTP_USER_AGENT} "Page Speed" RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp] ### marker WEBP end ### ### marker DROPQS start ### CacheKeyModify -qs:fbclid CacheKeyModify -qs:gclid CacheKeyModify -qs:utm* CacheKeyModify -qs:_ga ### marker DROPQS end ### </IfModule> ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END LSCACHE # BEGIN NON_LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## ### marker BROWSER CACHE start ### <IfModule mod_expires.c> ExpiresActive on ExpiresByType application/pdf A31557600 ExpiresByType image/x-icon A31557600 ExpiresByType image/vnd.microsoft.icon A31557600 ExpiresByType image/svg+xml A31557600 ExpiresByType image/jpg A31557600 ExpiresByType image/jpeg A31557600 ExpiresByType image/png A31557600 ExpiresByType image/gif A31557600 ExpiresByType image/webp A31557600 ExpiresByType video/ogg A31557600 ExpiresByType audio/ogg A31557600 ExpiresByType video/mp4 A31557600 ExpiresByType video/webm A31557600 ExpiresByType text/css A31557600 ExpiresByType text/javascript A31557600 ExpiresByType application/javascript A31557600 ExpiresByType application/x-javascript A31557600 ExpiresByType application/x-font-ttf A31557600 ExpiresByType application/x-font-woff A31557600 ExpiresByType application/font-woff A31557600 ExpiresByType application/font-woff2 A31557600 ExpiresByType application/vnd.ms-fontobject A31557600 ExpiresByType font/ttf A31557600 ExpiresByType font/woff A31557600 ExpiresByType font/woff2 A31557600 </IfModule> ### marker BROWSER CACHE end ### ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END NON_LSCACHE # BEGIN rlrssslReallySimpleSSL rsssl_version[3.3.1] <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTPS} !=on [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule> # END rlrssslReallySimpleSSL # BEGIN WordPress # Dyrektywy zawarte między <code>BEGIN WordPress</code> oraz <code>END WordPress</code> # są generowane dynamicznie i powinny być modyfikowane tylko za pomocą # filtrów WordPressa. Zmiany dokonane bezpośrednio tutaj będą nadpisywane. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # BEGIN Cache-Control Headers <IfModule mod_expires.c> <IfModule mod_headers.c> <filesMatch "\.(ico|jpe?g|png|gif|swf)$"> Header append Cache-Control "public" </filesMatch> <filesMatch "\.(css)$"> Header append Cache-Control "public" </filesMatch> <filesMatch "\.(js)$"> Header append Cache-Control "private" </filesMatch> <filesMatch "\.(x?html?|php)$"> Header append Cache-Control "private, must-revalidate" </filesMatch> </IfModule> </IfModule> # Disable ETags <IfModule mod_headers.c> Header unset ETag </IfModule> FileETag None # END WordPress # BEGIN ShortPixelWebp # Dyrektywy zawarte między <code>BEGIN ShortPixelWebp</code> oraz <code>END ShortPixelWebp</code> # są generowane dynamicznie i powinny być modyfikowane tylko za pomocą # filtrów WordPressa. Zmiany dokonane bezpośrednio tutaj będą nadpisywane. # END ShortPixelWebp
Просмотр 1 ответа (всего 1)
Просмотр 1 ответа (всего 1)
- Тема «Помощь Add Expires headers» закрыта для новых ответов.