Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
Welcome to Pro Webmasters, Chuck. If you want to display preformatted source code, simply put an empty line before the code, and then indent each line of code with either at least 1 tab or 4 or more spaces. A quick way to do this is to just highlight the code and then hit Ctrl+K. –  Lèse majesté Feb 22 '13 at 13:22
add comment

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!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.