Apache's DirectoryIndex directive tells Apache to look for, e.g. index.html
and index.php
if the client requests a directory.
Is there some easy way to get Apache to analogously look for e.g. /$filename.jpg
if the client requests /$filename
?
For example, if the client requested /foo
, then Apache might be configure to look for /foo.jpg
and /foo.png
on disk, and return a 404 if neither of these files exist. (I am aware that it's possible to use mod_rewrite
for this, however I would like a simple (and more performant) solution.)