-
-
Save dimobelov/382f5fc736ecb96a4ee9320f372a5a5f to your computer and use it in GitHub Desktop.
mod_pagespeed .htaccess configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access 1 year" | |
ExpiresByType image/jpeg "access 1 year" | |
ExpiresByType image/gif "access 1 year" | |
ExpiresByType image/png "access 1 year" | |
ExpiresByType text/css "access 1 month" | |
ExpiresByType text/html "access 1 month" | |
ExpiresByType application/pdf "access 1 month" | |
ExpiresByType text/x-javascript "access 1 month" | |
ExpiresByType application/x-shockwave-flash "access 1 month" | |
ExpiresByType image/x-icon "access 1 year" | |
ExpiresDefault "access 1 month" | |
</IfModule> | |
RewriteEngine On | |
#Begin gzip and deflate | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/html text/css application/x-javascript text/plain text/xml image/x-icon | |
</IfModule> | |
<IfModule pagespeed_module> | |
ModPagespeed on | |
ModPagespeedEnableFilters rewrite_css,combine_css | |
ModPagespeedEnableFilters recompress_images | |
ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp | |
ModPagespeedEnableFilters collapse_whitespace,remove_comments | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment