Skip to content

Instantly share code, notes, and snippets.

@alrnz
Forked from brichards/.htaccess
Created September 21, 2016 16:16
Show Gist options
  • Save alrnz/ea19eb0ab0ffa02e6f1bbafad19f244d to your computer and use it in GitHub Desktop.
Save alrnz/ea19eb0ab0ffa02e6f1bbafad19f244d 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,L]
</IfModule>
@alrnz
Copy link
Author

alrnz commented Sep 21, 2016

If mod_proxy is not available on the system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment