I am running apache2 on Ubuntu. I want to set expiration header like this.
ExpiresActive On <FilesMatch "\.(ico|gif|jpe?g|png|js|css)$"> ExpiresDefault "access plus 1 year" </FilesMatch>
I understang that it will cache a url like www.example.com/images/a.gif for one year.
Basically I am trying to find while caching does browser take into account full url including the data after the question mark.
Also my current vhost configuration looks like this
<VirtualHost xx.xx.xx.xx:80> ServerName xxxx ServerAlias xxxxx DocumentRoot /home/xxx/current/public <Directory "/home/xxxx/current/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Location /> # Insert filter SetOutputFilter DEFLATE # Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0 no-gzip # MSIE masquerades as Netscape, but it is fine BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # Don't compress images SetEnvIfNoCase Request_URI \ \.(?:gif|jpe?g|png)$ no-gzip dont-vary # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary </Location> </VirtualHost>
I am assuming that I can put ExpiresActive On and other statements just before tag begins.