RewriteRule and matching URI with <Location> *before* rewriting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm using the Zend PHP Framework with Apache 2. The ZF uses a
bootstrap file, so all requests are rewritten to index.php:
 RewriteRule .* index.php

Now I'd like to serve CSS and JS resources dynamically with the
index.php. So a request to "/resource/css/test.css" should deliver a
CSS file (echo'ed by index.php). This works fine.
But since this is static information, I'd like to let the client cache it.

Before serving those files dynamically with php, I had another
subdomain, which had the following options in the apache-config:
 ExpiresActive on
 ExpiresDefault "access plus 1 day"

To add those options again to all requests to URIs under "/resource/"
I somehow have to match them. I tried it with the Location-Directive:
 <Location /resource/>

But this does not work. I guess it's because the rewriting happens
before the matching. When I use "<Location index.php>" it works... But
that way I cannot separate the "/resource/"-requests from the rest.


I also tried to rearrange the config-block for the rewriting and the
matching of the "/resource"-requests. Nothing seems to work.
Does someone has an idea what could work?

Sincerely,
 Reto

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux