Last active
July 19, 2022 22:06
-
-
Save fgrweb/2a668b1fbf656e6c8213012177bfef43 to your computer and use it in GitHub Desktop.
Código en .htaccess para que lea los archivos de medios del sitio en producción
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
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ | |
RewriteRule ^(.*)$ https://sitioproduccion.com/$1 [QSA,L] | |
# Para entornos NGINX me ha funcionado poner lo siguiente en la configuración | |
location ~* ^.+\.(svg|svgz|jpg|jpeg|gif|png|ico|bmp|pdf)$ { | |
try_files $uri @image_fallback; | |
} | |
location @image_fallback { | |
proxy_pass http://sitioproduccion.com; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Si se utiliza Local by FlyWheel para desarrollar en local pega este código en el archivo
wordpress-single.conf.hbs
(si no es multisite), que está en la carpetaconf/nginx/includes