Forum Moderators: phranque
Using mod_rewrite's RewriteCond directive and "-f" flag, you simply make the rewrite conditional upon the requested file not existing.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.gif$ /replacement.gif [L]
Refs:
Apache mod_rewrite documentation [httpd.apache.org]
Apache URL Rewriting Guide [httpd.apache.org]
Regular Expressions Tutorial [etext.lib.virginia.edu]
Jim