We have a couple of contexts set up, web and cn. We have Babel set up. We have used rewrite in the .htaccess to point all requests for the /cn/ context to the usual assets/ folder where all the common images, css and js sit in their own folders /images/ js/ css.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(cn)/assets(.*)$ assets$2 [L,QSA]
It works fine on the links in chunks or templates e.g. assets/css/bootstrap.css., like it always has done in the past EXCEPT:
We have a client media source which limits the Client Editor to the assets/ folder, it's the default Media Source and has a basePath of assets/. On any image which is selected by using a TV, the rewrite doesn't work, showing a path of cn/images/ instead of writing to /assets/images. The image TVs have both web and cn contexts added with media source 'Client Files'. Can anyone see what we're doing wrong here?