httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] How to FilesMatch files within a certain domain
Date Sun, 30 Mar 2008 14:36:49 GMT
On Sun, Mar 30, 2008 at 5:05 AM, thomas Armstrong <tarmstrong@gmail.com> wrote:
> Hi.
>
>  I want to cache multimedia files by using "mod_expires" and created
>  this rule within my ".htaccess" file:
>  -------
>  ExpiresActive On
>  <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|swf)$">
>  ExpiresDefault A29030400
>  </FilesMatch>
>  --------
>
>  However, this ".htaccess" file is shared by five VirtualHosts, and I
>  would like to determine which VirtualHost must cache multimedia files.
>  I mean:
>  - "static.foo.com" must cache files
>  - "www.foo.com" must not
>
>  I tried with SERVER_NAME variable, but it won't work. I'd be grateful
>  if somebody could give me a hint to build the rule.

Do it in httpd.conf inside the <VirtualHost> section, not in .htaccess.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message