Skip to content

Instantly share code, notes, and snippets.

@josephhinson
Last active September 18, 2015 01:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephhinson/438dd083ab63c72ed6d5 to your computer and use it in GitHub Desktop.
Save josephhinson/438dd083ab63c72ed6d5 to your computer and use it in GitHub Desktop.
serve wp-uploads from production in dev htaccess
RewriteEngine On
RewriteBase /wp-content/uploads/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^tempurl.com$
RewriteRule ^(.+)$ http://siteurl.com/wp-content/uploads/$1 [L,R=301,NE]
@josephhinson
Copy link
Author

Drop this in your .htaccess file and stick it in your /wp-content/uploads folder so that you can pull down everything in the wp-content except the uploads folder. Will save you a lot of time and headache, as long as you're not uploading files ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment