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 01-24-2012, 12:57 PM   PM User | #1
low tech
Regular Coder

 
low tech's Avatar
 
Join Date: Dec 2009
Posts: 740
Thanks: 149
Thanked 67 Times in 67 Posts
low tech is on a distinguished road
help with set headers htaccess

Hi all



following on from this thread about setting expire headers

http://www.codingforums.com/showthread.php?t=249403

2 points came out of that discussion

1) does my host provider allow headers to be set

2) I should use htaccess



I have checked with my host provider to see if I am allowed to set headers and they said
"If that is any change that you can carry out via .htaccess then you can but if that needs any modules installation server wide, then its not supported."

So I think I can.

and I have read info on htaccesss given in this link
http://www.askapache.com/htaccess/ap...e-control.html


so now I have this in my htaccess (from above link)

<filesMatch "\.(ico|jpg|jpeg|png|gif|js|css)$">
Header set Cache-Control "public"
Header set Expires "Mon, 01 Jan 2013 20:00:00 GMT"
</filesMatch>

I have two issues

1) I have no idea if this is right or if it is being applied ----- how do I check / know if these headers are set?

2) I think I should also set a Last-Modified header too --- but I can't find an example to copy to add in to the above.

I really need some help

LT


by the way Firefox xhows this for response header info

Date: Tue, 24 Jan 2012 12:52:22 GMT
Server: Apache
X-Powered-By: PHP/5.2.17
Content-Length: 49800
Connection: close
Content-Type: text/html

200 OK
__________________
Ask not what can I do for myself, but what can I do for others

"The greatest revenge is to accomplish what others say you cannot do."
~ Unknown
low tech is offline   Reply With Quote
Old 01-25-2012, 03:37 AM   PM User | #2
low tech
Regular Coder

 
low tech's Avatar
 
Join Date: Dec 2009
Posts: 740
Thanks: 149
Thanked 67 Times in 67 Posts
low tech is on a distinguished road
Hi all

Ok I have decided after a lot of reading to forget the last modified header since I have come across this 'unset Last-Modified' several times.

And since the htaccess I have above doesn't seem to cause any issuse I'll just leave it as is even tho I have no idea if those headers are actually set.

LT
__________________
Ask not what can I do for myself, but what can I do for others

"The greatest revenge is to accomplish what others say you cannot do."
~ Unknown
low tech 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 08:03 PM.


Advertisement
Log in to turn off these ads.