Skip to content

Instantly share code, notes, and snippets.

@samatsav
Created September 25, 2013 20:44
Show Gist options
  • Save samatsav/6705758 to your computer and use it in GitHub Desktop.
Save samatsav/6705758 to your computer and use it in GitHub Desktop.
Rewrite all images not found to a default image
RewriteEngine on
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|gif|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*$ /DEFAULTIMAGE.png [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment