Hello!
I have a problem, please help.
PageSpeed Insights it says that the files are not cached in the browser.
I have tried different ways in .htaccess, nothing turns out.
My .htaccess:
What do I need to write in .htaccess in order to enable caching js, css, images files?
I have a problem, please help.
PageSpeed Insights it says that the files are not cached in the browser.
I have tried different ways in .htaccess, nothing turns out.
My .htaccess:
Code:
# Remove index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
# Redirect www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# Enabled GZIP
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
</IfModule>
What do I need to write in .htaccess in order to enable caching js, css, images files?