Last active
September 17, 2021 12:10
-
-
Save ianpegg/0fd4906e65f8a8d0355d44b5c07d294b to your computer and use it in GitHub Desktop.
Fetch 'uploads' files from LIVE if not found 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteOptions Inherit | |
# If the requested URL doesn't match a directory or file... | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# Rewrite the request to be fetched from LIVE instead | |
RewriteRule wp-content/uploads/(.*) | |
## Be sure to replace 'example.com' with the domain name of LIVE ## | |
https://www.example.com/wp-content/uploads/$1 [NC,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment