Last active
October 26, 2016 01:04
-
-
Save johnolek/d626f48d4b70686add2de475e7e07d1b to your computer and use it in GitHub Desktop.
.htaccess RewriteRule to serve WordPress images from a different domain
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 | |
RewriteBase / | |
RewriteRule ^(wp-content/uploads/\d+/.*)$ http://example.com/$1 [R=301,NC,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment