Set "expires" header for a whole directory
So let's say:
- .htaccess
* assets
|> images
|> logo.png
|> css
|> style.css
|> home.css
How c开发者_StackOverflow中文版an i set the expires header for the whole assets folder and its contents?
I know that i can set it by type like:
ExpiresByType text/javascript "modification plus 2 hours 45 minutes"
But what about for a whole directory?
At the .conf level, use a <directory>
directive:
<Directory /path/to/your/assets/folder>
ExpiresDefault ...
</Directory>
If you have only .htaccess control, then put a .htaccess into the assets folder with the same ExpiresDefault
directive
精彩评论