Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

caching with htaccess

Options
  • 11-11-2010 10:19pm
    #1
    Registered Users Posts: 648 ✭✭✭


    hi

    im trying to cache js css and image files and i find on some other sites they say put this into a htaccess file :
    # 1 YEAR
    <FilesMatch "\.(ico|pdf|flv)$">
    Header set Cache-Control "max-age=29030400, public"
    </FilesMatch>
    # 1 WEEK
    <FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
    Header set Cache-Control "max-age=604800, public"
    </FilesMatch>
    # 2 DAYS
    <FilesMatch "\.(xml|txt|css|js)$">
    Header set Cache-Control "max-age=172800, proxy-revalidate"
    </FilesMatch>
    # 1 MIN
    <FilesMatch "\.(html|htm|php)$">
    Header set Cache-Control "max-age=60, private, proxy-revalidate"
    </FilesMatch>
    

    but when i put that into my root .htaccess file i get Internal Server Error


    can anyone point out what i may be doing wrong ?
    it does go into the htaccess file does it ?
    Cheers


Advertisement