You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by thomas Armstrong <ta...@gmail.com> on 2008/03/30 11:05:44 UTC
[users@httpd] How to FilesMatch files within a certain domain
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.
Thank you very much.
---------------------------------------------------------------------
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
Re: [users@httpd] How to FilesMatch files within a certain domain
Posted by Joshua Slive <jo...@slive.ca>.
On Sun, Mar 30, 2008 at 5:05 AM, thomas Armstrong <ta...@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