Created
February 18, 2019 15:36
-
-
Save derak-kilgo/72951da369454d62a883a97c99336639 to your computer and use it in GitHub Desktop.
Apache mod_rewrite - Send requests for missing images to another server.
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
#Often the test system is using a subset of our live data. We don't include media in those copies. | |
#In QA; Rewrite missing images to the live server. | |
RewriteEngine On | |
#RewriteBase / #Use this if your placing this in a .htaccess file. | |
RewriteCond %{REQUEST_URI} \.(jpe?g|bmp|png)$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ https://somelivedomain.test/$1 [L,R=302] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment