Skip to content

Instantly share code, notes, and snippets.

@brichards
Last active May 25, 2019 04:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save brichards/403ce36413e6547c0856 to your computer and use it in GitHub Desktop.
Save brichards/403ce36413e6547c0856 to your computer and use it in GitHub Desktop.
Tell Apache to serve missing images from a remote server. Props http://stackoverflow.com/questions/5130410/modrewrite-to-another-server-if-file-image-is-not-found
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) http://example.com/$1 [NC,P,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment