Last active
November 27, 2015 08:40
-
-
Save daveaspinall/579152fa35f70bfc21e3 to your computer and use it in GitHub Desktop.
Redirect all requests to wp-uploads to staging site
This file contains hidden or 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 | |
# Redirect upload requests to staging site | |
RewriteRule ^wp-content/uploads/(.*)$ http://staging.domain.com/wp-content/uploads/$1 [L,R=301] | |
# WP redirects follow... | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment