Last active
March 8, 2017 23:55
-
-
Save creativecoder/6162260 to your computer and use it in GitHub Desktop.
Apache redirect for missing images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Place inside a <VirtualHost> or <Directory> declaration | |
# | |
# Particularly useful for displaying images in a local development environment | |
# without actually downloading all of the images | |
# | |
# Props to Mark Jaquith for the suggestion at WordCamp SF 2013 | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule (.*)(png|jpg|jpeg|gif|svg)$ http://www.example.com$1$2 [L] |
Look how nice you are, giving props to Jaquith.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Grant FTW!
Might want to add svg to the list.