Skip to content

Instantly share code, notes, and snippets.

@jtrobman
Last active December 29, 2015 11:09
Show Gist options
  • Save jtrobman/7661586 to your computer and use it in GitHub Desktop.
Save jtrobman/7661586 to your computer and use it in GitHub Desktop.
Apache config to render all Drupal files from www except CSS and JS.
ProxyPassMatch .+/files/(css|js)/.+ !
ProxyPassMatch ^/sites/(.+)/files/(.+)$ http://www.$1/sites/$1/files/$2
@casivaagustin-zz
Copy link

Similar rule for nginx

    location ~ ^/sites/.*/files/.*$ {
        rewrite ^/sites/(.*)/files/(.*)$ http://www.$1/sites/$1/files/$2 redirect;
    }

Nate show me this for apache a few days ago, the best tip of the year. Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment