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!

Enableing Mod_expires

Discussion in 'Workarounds and Optimization' started by amorosso, Jan 22, 2013.

  1. amorosso

    amorosso Active Member

    Joined:
    Aug 29, 2009
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    56
    Hi everyone. Can someone please show me how to enable mod_expires and mod_rewrite. Expires is my bigger issue. I built Apache with expires and rewrite but I can not get expires to work for nothing. Then I learned that it needs to be enabled.. Any help would be great...

    Oh sorry. This is what I have going on in my ,htaccess file

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html "access plus 1 seconds"
    ExpiresByType image/gif "access plus 1 years"
    ExpiresByType image/jpeg "access plus 1 years"
    ExpiresByType image/png "access plus 1 years"
    ExpiresByType image/x-icon "access plus 1 years"
    ExpiresByType text/css "access plus 1 years"
    ExpiresByType text/javascript "access plus 1 years"
    ExpiresByType application/x-javascript "access plus 1 years"
    ExpiresByType application/x-shockwave-flash "access plus 1 years"
    </IfModule>

    And it has no effect at all.
     
  2. amorosso

    amorosso Active Member

    Joined:
    Aug 29, 2009
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    56
    Ok a little more new info. It seems if I do a header check on my site with out the www. I get better results. as shown below.

    HTTP/1.1 301 Moved Permanently =>
    Date => Tue, 22 Jan 2013 20:41:25 GMT
    Server => Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
    Location => domainnamehere
    Cache-Control => max-age=1
    Expires => Tue, 22 Jan 2013 20:41:26 GMT
    Content-Length => 413
    Connection => close
    Content-Type => text/html; charset=iso-8859-1

    But with the www. I get this

    HTTP/1.1 200 OK =>
    Date => Tue, 22 Jan 2013 20:56:37 GMT
    Server => Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
    X-Powered-By => PHP/5.3.20
    Expires => Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control => no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma => no-cache
    Set-Cookie => VivvoSessionId=0733b294182520a8d873c4219d98c6ca; path=/; domain=.askmediy.com
    Connection => close
    Content-Type => text/html

    Here is my .htaccess contents


    I'm kinda thinking that it has something to do the htaccess file
     
    #2 amorosso, Jan 22, 2013
    Last edited: Jan 22, 2013
Loading...

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