Created
January 9, 2013 19:59
-
-
Save benklocek/4496316 to your computer and use it in GitHub Desktop.
WordPress .htaccess: Load image from Live if not on dev
This file contains hidden or 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
# Attempt to load files from production if they're not in our local version | |
# Adapted from: http://stevegrunwell.com/blog/keeping-wordpress-under-version-control-with-git | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^assets/(.*\.(gif|jpg|png)) http://site.com/assets/$1 [L,R] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment