Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Questo qui Γ¨ il codice che permette di effettuare il caching del sito:
- ## EXPIRES CACHING ##
- <IfModule mod_expires.c>
- ExpiresActive On
- # Default
- ExpiresDefault "access plus 1 month"
- # My favicon
- ExpiresByType image/x-icon "access plus 1 year"
- # Images
- ExpiresByType image/gif "access plus 1 month"
- ExpiresByType image/png "access plus 1 month"
- ExpiresByType image/jpg "access plus 1 month"
- ExpiresByType image/jpeg "access plus 1 month"
- # CSS
- ExpiresByType text/css "access plus 1 month"
- # Javascript
- ExpiresByType application/javascript "access plus 1 year"
- ExpiresByType text/x-javascript "access plus 1 year"
- # Documents
- ExpiresByType text/html "access 1 month"
- ExpiresByType application/pdf "access 1 month"
- </IfModule>
- # Questo invece Γ¨ il codice che comprime i file
- <ifModule mod_gzip.c>
- mod_gzip_on Yes
- mod_gzip_dechunk Yes
- mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
- mod_gzip_item_include handler ^cgi-script$
- mod_gzip_item_include mime ^text/.*
- mod_gzip_item_include mime ^application/x-javascript.*
- mod_gzip_item_exclude mime ^image/.*
- mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
- </ifModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement