We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44922
    • 131 Posts
    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?
      • 44922
      • 131 Posts
      Well, we solved this totally by accident. It was nothing to do with the rewrite.

      The TVs were created in Context 1 before Content 2 was needed or created. Even though each TV had both contexts in Media Source with Client Files as the value, we had to manually add the values again - and it now works. So essentially we were selecting and saving the values which were already there on the Media Source tab of the TVs. Bummer, can't tell you how much pain that caused.