Skip to content

Instantly share code, notes, and snippets.

@mustafauysal
Last active Jun 29, 2018
Embed
What would you like to do?
uploads from production server
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} ^localsite\.test$
RewriteRule ^wp-content/uploads/(.*)$ https://example.com/wp-content/uploads/$1 [NC,L]
</IfModule>
location ~* \.(jpeg|gif|png|css|bmp|js|ico|txt|mp3|mp4|flv|wma|wmv|xml)$ {
if (!-f $request_filename) {
rewrite ^(.*)$ http://example.com/$1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment