Htaccess File

DooMinik/dmees.hol.es/master/.htaccess

DEFLATE
RewriteBase /
# Deflate Compression by FileType
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/atom_xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-shockwave-flash
</IfModule>

# turns cache on for 1 month
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType text/javascript "access plus 1 month"
    ExpiresByType text/html "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 month"
</IfModule>
<ifmodule mod_headers.c>
    <filesmatch "\.(png)$">
        Header set Cache-Control "max-age=2592000, public"
    </filesmatch>
    <filesmatch "\.(css)$">
        Header set Cache-Control "max-age=604800, public"
    </filesmatch>
    <filesmatch "\.(js)$">
        Header set Cache-Control "max-age=216000, private"
    </filesmatch>
</ifmodule>

# Deflate Compression by MimeType
<IfModule mod_deflate.c>
    <FilesMatch ".(js|png|css)$">
        ExpiresActive on
        ExpiresDefault "access plus 1 month"
        SetOutputFilter DEFLATE
    </FilesMatch>
</IfModule>
Exit mobile version