Skip to content

Instantly share code, notes, and snippets.

@bacoords
Created July 27, 2017 17:25
Show Gist options
  • Save bacoords/361716ce9c7ea90f2688fe753d6e3003 to your computer and use it in GitHub Desktop.
Save bacoords/361716ce9c7ea90f2688fe753d6e3003 to your computer and use it in GitHub Desktop.
Rewrite the wp-content/uploads folder to display from live site.
<IfModule mod_rewrite.c>
RewriteEngine On
RedirectMatch 301 ^/wp-content/uploads/([0-9]{4})/([0-9]{2})/(.*)$ https://www.mylivesite.com/wp-content/uploads/$1/$2/$3
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment