Last active
February 11, 2018 21:19
-
-
Save duaneleem/71ae4d405c29f4a621f0d1b428f310c1 to your computer and use it in GitHub Desktop.
WordPress Assets Loaded from Production
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
# Send all uploads links to production. | |
location ^~ /wp-content/uploads { | |
rewrite ^/wp-content/uploads/(.*)$ https://www.duaneleem.com/wp-content/uploads/$1 permanent; | |
} |
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
# ================================================================================ | |
# Redirects uploads to production. | |
# ================================================================================ | |
<IfModule mod_rewrite.c> | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^wp-content/uploads/(.*)$ https://www.duaneleem.com/wp-content/uploads/$1 [R=301,NC,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment