Last active
November 28, 2016 08:50
-
-
Save simonlk/8856fc749b544de5a3ed08aca9e3b0f6 to your computer and use it in GitHub Desktop.
WordPress load uploads from external website.
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
# Create .htaccess file within /wp-content/uploads/ and add the below code | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} http://dev.example.com # Only perform on dev site | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*) http://www.example.com/wp-content/uploads/$1 [L,P] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment