Created
April 5, 2018 18:58
-
-
Save lfbittencourt/6aaca58a760d71c324459a93f886bed5 to your computer and use it in GitHub Desktop.
Loads production assets in case files don't exist locally
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Try production domain if file doesnt exists | |
RewriteCond %{HTTP_HOST} !^foo\.com [NC] | |
RewriteCond %{REQUEST_FILENAME} !-f [NC] | |
RewriteRule ^uploads/.*$ http://foo.com/$0 [L,NC] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment