<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 2 month" ExpiresByType image/jpg "access 2 month" ExpiresByType image/gif "access 2 month" ExpiresByType image/jpg "access 2 month" ExpiresByType image/jpeg "access 2 month" ExpiresByType image/png "access 2 month" ExpiresByType text/css "access 2 month" ExpiresByType application/x-javascript "access plus 2 month" ExpiresByType text/javascript "access plus 2 month" ExpiresByType application/javascript "access plus 2 month" ExpiresByType image/x-icon "access plus 12 month" ExpiresByType image/icon "access plus 12 month" ExpiresByType application/x-ico "access plus 12 month" ExpiresByType application/ico "access plus 12 month" </IfModule>You can check the HTTP response header to see if the changes are in effect. Here is screen shot from chrome developer tools...
![]() |
If you are using Virtual Private Hosting(VPS) with Plesk then you must change or create the vhost.conf and vhost_ssl.conf files in the conf folder of your domain dir. In my case the full path was
- /var/www/vhosts/demo.mysamplecode.com/conf/vhost.conf
- /var/www/vhosts/demo.mysamplecode.com/conf/vhost_ssl.conf
After you have done editing, for these changes to take effect run the following command
/usr/local/psa/admin/bin/httpdmng --reconfigure-domain {your_domain_name}
Here is an example based on my website
/usr/local/psa/admin/bin/httpdmng --reconfigure-domain demo.mysamplecode.com
No comments:
Post a Comment
NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.