Media URLs Out Of Sync between Servers
This page explains how to solve the "out-of-sync" problem with media URLs on your different environments.
tl;dr
# .env
# SHOPWARE_CDN_STRATEGY_DEFAULT="physical_filename" - or -
SHOPWARE_CDN_STRATEGY_DEFAULT="id"bin/console media:update-path --forceThe Problem
<IfModule mod_rewrite.c>
RewriteEngine On
RedirectMatch 301 ^/media/(.*)$ https://<your-production-server>/media/$1
RedirectMatch 301 ^/thumbnail/(.*)$ https://<your-production-server>/thumbnail/$1
</IfModule># locally
.../a1/b2/c3/myPicture.jpg
# server
.../1c/2b/3a/myPicture.jpgShopware's Media Pathname Strategies
Recommended Action
Last updated