To assist with a responsive design I’m working on I would like to redirect requests for .jpg, .gif, .png etc to a php file.
Can this be acheived with Filesmatch?
I’ve found examples for setting headers cache expiration and the like (see code sample), but none for redirection, can anyone point to or provide such and example?
Feedback on the .htaccess approach welcome.
<FilesMatch "\.(js|css|png|gif|jpg)$">
</FilesMatch>
See
RedirectMatchinstead, it feels similar and does redirect.But as you transparently want to cache, I assume you’re more looking for a
RewriteRulemaybe?