Created
September 6, 2019 19:00
-
-
Save cr0ybot/4a53ec02d9b7bf5c4afcf8f70d9d85b2 to your computer and use it in GitHub Desktop.
WP local dev fetch images from staging
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
# Load uploads from staging server if they don't exist locally | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{HTTP_HOST} ^example\.local$ | |
RewriteRule ^wp-content/uploads/(.*)$ https://example.staging.com/wp-content/uploads/$1 [NC,L] | |
</IfModule> | |
# BEGIN WordPress | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment