Created
January 27, 2017 13:32
-
-
Save niladam/2277fa462c65eca36b714bc78ea02d34 to your computer and use it in GitHub Desktop.
.htaccess redirect wp-content/uploads folder to subdomain
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
.htaccess | |
# Re-direct wp-content/uploads to subdomain | |
RewriteRule wp-content/uploads/(.*) http://uploads.example.com/$1 [R=301,L] | |
wp-config.php | |
// Make sure that we put uploads in the right place | |
update_option( | |
'upload_url_path', | |
'http://uploads.aubreypwd.com' | |
); | |
update_option( | |
'upload_path', | |
'../uploads.aubreypwd.com/' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment