Last active
April 13, 2018 18:39
-
-
Save deryckoe/8c53fd0bd938fb32d1f0c2a18be7983a to your computer and use it in GitHub Desktop.
Remote Upload
This file contains 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
#Put this file in wp-content/uploads and modify remote domain. | |
#Copia este arhivo en wp-content/uploads and modifica el dominio remoto. | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /wp-content/uploads/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*) http://remotedomain.tld/wp-content/uploads/$1 [L,P] | |
</IfModule> |
Con nginx, es así:
server {
server_name _;
return 302 $scheme://dominio.local$request_uri;
}
server {
# Directives to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpe?g|gif|ico)$ {
expires 24h;
log_not_found off;
try_files $uri $uri/ @production;
}
location @production {
resolver 8.8.8.8;
proxy_pass https://dominioremoto.com/$uri;
}
server_name ~^(.*)\.dominio\.local$ dominio.local;
root /app/public/;
index index.php index.html index.htm;
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
En el caso de local, tuve que crear un .htaccess así, en la raíz.