Skip to content

Instantly share code, notes, and snippets.

@shanaver
Created November 1, 2013 17:42
Show Gist options
  • Save shanaver/7269023 to your computer and use it in GitHub Desktop.
Save shanaver/7269023 to your computer and use it in GitHub Desktop.
Wordpress htaccess rewrite so you don't have to copy all the live uploads locally for testing
# ----------------------------------------------------------------------
# dev redirect requests for stuff in the uploads dir
# ----------------------------------------------------------------------
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} (/wp-content/uploads/)
RewriteRule ^(.*)$ http://www.website.org/$1 [QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment