Hosting Web & Klasik Bantuan

Enabling mod_expires with Your Hosting Account

Mod_expires is an Apache Web server module installed on all of our Linux hosting accounts by default and supports all mod_expires functionality. For more information, see What is mod_expires?

Because we do not enable mod_expires at the global level, you need to enable it in your .htaccess file. You can enable it on a per-directory basis and it applies recursively.

Note: Our environment uses the vendor-provided code from Apache for mod_expires. Current Apache HTTPD documentation is accurate for using .htaccess files with our hosting accounts.

This example enables mod_expires for a set of common image types and CSS files:


    # Activate mod_expires for this directory
    ExpiresActive on

    # locally cache common image types for 7 days
    ExpiresByType image/jpg "access plus 7 days"
    ExpiresByType image/jpeg "access plus 7 days"
    ExpiresByType image/gif "access plus 7 days"
    ExpiresByType image/png "access plus 7 days"

    # cache CSS files for 24 hours
    ExpiresByType text/css "access plus 24 hours"

For more information, see Apache's mod_expires documentation.


Apakah Artikel Ini Berguna?
Terima kasih atas masukan Anda. Untuk berbicara dengan perwakilan layanan pelanggan, hubungi nomor ponsel dukungan atau gunakan opsi chatting di atas.
Senang bisa membantu! Ada hal lain yang dapat kami lakukan untuk Anda?
Maaf tentang hal tersebut. Sampaikan apa yang membuat Anda bingung atau mengapa solusi tersebut tidak mengatasi masalah Anda.