Mobile app version of vmapp.org
Login or Join
Kaufman445

: 'ExpiresActive On' and 'ExpiresDefault "access"' in .htaccess make site disappear in WAMP I'm working on a site locally within a folder with WAMP. When I add the following to my .htaccess file

@Kaufman445

Posted in: #Htaccess #Wampserver

I'm working on a site locally within a folder with WAMP. When I add the following to my .htaccess file the folder is no longer viewable in WAMP.

ExpiresActive On

ExpiresDefault "access"

I'm working on a cache manifest demo and the code is to prevent files being cached, I've no idea why it would make the folder disappear.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Kaufman445

2 Comments

Sorted by latest first Latest Oldest Best

 

@Gail5422790

Actually I think it is something different. When I tried to load a site with ExpiresActive On in the .htaccess file my site also does not load. In the apache error.log it says the following:

Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration


After enabling Expires Module through WAMP system tray it works!

10% popularity Vote Up Vote Down


 

@Goswami781

I suspect a different approach will work better (I haven't actually tested this though:-). Try in your .htaccess something like

ExpiresActive Off

Header set Cache-Control "no-cache, proxy-revalidate, no-transform"

Header set Pragma "no-cache"

(No blank lines needed in .htaccess, but if I leave them out here "line wrap" thinks it's just a funky paragraph and runs everything together.)

What you've got now specifies that the pages ARE cacheable, but the cache time is 0, so all pages are always out of date. This arguably doesn't make a whole lot of sense, and who knows which piece of software is doing some "error recovery" that results in the directory not being visible. I suspect something is stuck in a loop requesting the same page over and over trying to get a copy that isn't already expired, and the failsafe for too many loops goes off and the browser just throws up its hands and makes the whole folder invisible.

It's sometimes true that "xxx but 0" is the same as "no-xxx" ...but not in this case. Saying to an Apache server "cacheable but 0" is NOT quite the same as saying "not cacheable" ...close but not the same, and possibly handled weirdly by some software.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme