Last active
January 1, 2020 17:56
-
-
Save chrisjangl/4c5f0352c44599efc26218ee14eb0e13 to your computer and use it in GitHub Desktop.
Load images requested on a local/dev (or any)WordPress site from the production (or any other) site. Make sure to add this snipped ABOVE the WordPress rewrite rules
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 | |
RewriteRule ^(wp-content/uploads/\d{4}/\d\d/.*\.jpg)$ https://<your-production-url>.com/$1 [QSA,L] | |
RewriteRule ^(wp-content/uploads/\d{4}/\d\d/.*\.png)$ https://<your-production-url>.com/$1 [QSA,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment