Welcome to WebmasterWorld Guest from 184.72.177.182

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

How to enable mod expires on Apache shared hosting?

     
5:42 pm on Nov 11, 2012 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 23, 2007
posts:143
votes: 0


I'm trying to set up caching on my site. I have shared hosting at Hostgator. I have the code it my htaccess but it doesn't seem to be working. Talking to Hostgator teck support they say they don't have that on shared accounts. Is there anyway to enable it on my end? Thanks!
7:26 pm on Nov 11, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


if the module isn't loaded you cannot enable it.
12:18 am on Nov 12, 2012 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 23, 2007
posts:143
votes: 0


Is there any alternative? Seems silly I can't do it when every single write up on the subject says I should cache my stuff. Possibly php
2:56 am on Nov 12, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12700
votes: 244


Most things written about most server behavior-- including Apache's own docs-- assume that it is your own server and you have absolute control.

What exactly does your non-working code say? Sometimes there is more than one way to achieve the same result. fwiw, headers and redirects fall into the same AllowOverrides category.

I doubt the config file says "no caching at all". It's probably got a default value.
3:03 am on Nov 12, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


Is there any alternative?

another hosting provider or another level of hosting with your current provider which supports mod_expires.

you can provide an Expires header with your response if you are using php.
this might be helpful.
Conteg v0.13 available on PHP Classes - PHP Server Side Scripting forum:
http://www.webmasterworld.com/php/3277772.htm [webmasterworld.com]
10:02 am on Nov 12, 2012 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 23, 2007
posts:143
votes: 0


Thanks guys for your response. It's funny just like 1000 other things, in a year from now this will be a trivial thing, but now it's a total unknown. I will try php once I've completely exhausted htaccess. I currently have this in my htaccess...

ExpiresActive On
ExpiresDefault "access plus 10 years"
ExpiresByType text/html "access plus 1 day"

I'm going to try mod_headers code now and see if that works.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members