Skip to content

Instantly share code, notes, and snippets.

@mustafauysal
Last active June 29, 2018 09:28
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 mustafauysal/11269170 to your computer and use it in GitHub Desktop.
Save mustafauysal/11269170 to your computer and use it in GitHub Desktop.
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