homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

How to enable mod expires on Apache shared hosting?

 5:42 pm on Nov 11, 2012 (gmt 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)

if the module isn't loaded you cannot enable it.


 12:18 am on Nov 12, 2012 (gmt 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)

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)

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)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved