homepage Welcome to WebmasterWorld Guest from 54.226.173.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
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?
ewwatson




msg:4518074
 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!

 

phranque




msg:4518082
 7:26 pm on Nov 11, 2012 (gmt 0)

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

ewwatson




msg:4518145
 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

lucy24




msg:4518187
 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.

phranque




msg:4518188
 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]

ewwatson




msg:4518250
 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