Last active
October 17, 2017 22:47
-
-
Save ceer/805eb82ec13e1d83e5171ed929ad1746 to your computer and use it in GitHub Desktop.
Serve prod images on local/stage server
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 | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} ^/.*\.(jpe?g|gif|svg|png)$ [NC] | |
RewriteRule (.*\.(jpe?g|gif|svg|png))$ https://example.com$1 [R=302,NC,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment