title: IIS 7.5 How do you add a Dynamic HTTP Expires Header
body: <p>In IIS 7.5, you can add static HTTP Response headers, but I want to add an "Expires" header that always specifies a date that is 7 days in the future.</p>
  
  <p>I'm running php 5.4, so I'd like a solution that can do this by editing the web.config file rather than some c# code solution.</p>
  
  <p>I know how to add the header using php, but that won't help for static image file's http headers (jpg, gif, png, etc).</p>
  
  <p>The header should look something like this:</p>
  
  <p>Expires: Thu, 31 May 2012 10:59:25 GMT</p>
  
  <p>How can I make it dynamically always show a date and time 7 days in the future?</p>
  
  <p>Edit:</p>
  
  <p>Notice that I have the expires header that I want on my php files:</p>
  
  <p><a href="http://web-sniffer.net/?url=http%3A%2F%2Fwww.bestds.com" rel="nofollow">http://web-sniffer.net/?url=http%3A%2F%2Fwww.bestds.com</a></p>
  
  <p>However, I'm not able to specify a date that is 7 days ahead for the "Expires" key on png files (for example), I'm having to use a static date far in the future:</p>
  
  <p><a href="http://web-sniffer.net/?url=http%3A%2F%2Fwww.bestds.com%2Fimage%2Ftlogo.png" rel="nofollow">http://web-sniffer.net/?url=http%3A%2F%2Fwww.bestds.com%2Fimage%2Ftlogo.png</a></p>