-
-
Save CarlosLongarela/41f6d0e74e37d0c7647ab5117c811822 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
code by https://github.com/fgrweb