Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-15-2012, 12:06 AM   PM User | #1
Zukdeen
New to the CF scene

 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Zukdeen is an unknown quantity at this point
Question Need help: cache and .htaccess

Hello. I don't know if this belongs here, but I didn't find anywhere else to put this, and I'd like to get help with this.

In my website, I want the images to be on the cache for 2 weeks, and the .js and .css files for 3 days. I put this code in my .htaccess

Code:
<FilesMatch "\.(jpg|jpeg|png|gif|swf|ico)$">
SetOutputFilter DEFLATE
ExpiresActive on
ExpiresDefault A1209600
Header set Cache-Control "max-age=1209600"
</FilesMatch>

<FilesMatch "\.(css|js)$">
SetOutputFilter DEFLATE
ExpiresActive on
ExpiresDefault A259200
Header set Cache-Control "max-age=259200"
</FilesMatch>
However, it is not working, I think it is not saving in the cache. What's wrong with my code? What can I do?
Thanks.
Zukdeen is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:26 AM.


Advertisement
Log in to turn off these ads.