Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

how to enable If-Modified-Since header

Discussion in 'CloudLinux' started by arun123, Oct 10, 2011.

  1. arun123

    arun123 Registered

    Oct 10, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Could anyone kindly explain how to enable "If-Modified-Since header" with apache. Checking the apache modules, i could see the necessary modules (mod_expires and mod_headers) is enabled by default.

    Apache version 2.21
    CloudLinux Server release 5.7

    I tried to add following lines to httpd.conf, but got error while restart saying it is builtin.
    LoadModule expires_module libexec/
    LoadModule headers_module libexec/

    So kindly someone tell me how to enable
    "If-Modified-Since header" or if it is enabled in default, how to check it
  2. jasonhk

    jasonhk Well-Known Member

    Nov 11, 2005
    Likes Received:
    Trophy Points:
    You need to use EasyApache and enable the "Expires" module. Once that is done use .htaccess to activate.

    .htaccess (modified) example
    # enable expirations
    ExpiresActive On
    # expire GIF images after a month in the client's cache
    ExpiresByType image/gif A2592000
    # HTML documents are good for a week from the
    # time they were changed
    ExpiresByType text/html M604800

    Resources: mod_expires - Apache HTTP Server

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice