Menú
08225, Terrassa (Barcelona)
Soporte Técnico
Sábados a convenir
Cita de admin en 20 septiembre, 2019, 6:00 pmAdd expires headers to .htaccess file
.htaccess is often a hidden file found in your root directory. Before you make any changes to it, make sure you have an extra copy.
Now go to your website’s root and download your .htaccess file, if this file is hidden for you, you may have to use FTP to enable the “Show Hidden files” option.
Once you have downloaded the file, open your .htaccess in any editor (notepad or notepad++) and add the code below:
## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 month" ExpiresByType application/pdf "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 2 days" </IfModule> ## EXPIRES CACHING ##
.htaccess is often a hidden file found in your root directory. Before you make any changes to it, make sure you have an extra copy.
Now go to your website’s root and download your .htaccess file, if this file is hidden for you, you may have to use FTP to enable the “Show Hidden files” option.
Once you have downloaded the file, open your .htaccess in any editor (notepad or notepad++) and add the code below:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING ##
© Informàtica Can Boada All rights reserved