I have a site that is multilingual using path prefix, for example I can have:

  • example.com/en
  • example.com/es
  • example.com/fr

If the user goes to example.com, a language selection page appears (using the language selection module).

But I'm trying to enable the CDN module and it's not working because all resources are pointing to example.com/sites/.../somecss.css instead of example.com/en/sites/...

If I disable the CDN module the resources are pointed to the correct path. How can I fix this? I think it's bug in the CDN module.

Using Drupal 7 & Amazon CloudFront. I don't want to change the site to subdomain for the languages (eg, en.example.com).

  • One workaround would be to point CloudFront to something like cloudread.example.com and in the htaccess redirect all with that domain to example.com/en, to skip the language selection page. Jun 10, 2014 at 19:17
  • Give AdvAgg a try. I think it will work correctly for this use case & will work with the CDN module.
    – mikeytown2
    Jun 10, 2014 at 22:44
  • Cool module. Unfortunately it didn't work :( Even with the CDN disabled, the files point to example.com/sites... Jun 10, 2014 at 23:24
  • Bad workaround: so far I've changed cdn.module, ln 105 from: $uri = "cdn/farfuture/$token/$ufi/$uri"; to $uri = "en/cdn/farfuture/$token/$ufi/$uri"; and it worked. S*cks as a solution, but it works. Jun 10, 2014 at 23:31
  • May I ask why you need the language prefix? I think with advagg everything will work (with no language prefix) unless I'm missing something. AdvAgg will create different css & js aggregates based off of the language used.
    – mikeytown2
    Jun 10, 2014 at 23:36

1 Answer 1


Found the issue the Language Selection Page module is causing the issue https://drupal.org/node/2283985. You can see the styles exemption in the code. For you I would add in the advagg and cdn paths to the language_selection_page_blacklisted_paths variable. You should find it under "Paths blacklist" on the admin/config/regional/language/configure/selection_page page.

Gotta run will add in the exact paths tomorrow, but it will be something like


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.