Skip to content

Instantly share code, notes, and snippets.

@mkay
Last active October 6, 2015 08:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkay/dffcca950deb041e2bd0 to your computer and use it in GitHub Desktop.
Save mkay/dffcca950deb041e2bd0 to your computer and use it in GitHub Desktop.
MODX Babel rewrites for nginx
server {
location / {
# MODX babel rewrites
rewrite ^/(en|de)/css(.*)$ /css$2 break;
rewrite ^/(en|de)/js(.*)$ /js$2 break;
rewrite ^/(en|de)/img(.*)$ /img$2 break;
rewrite ^/(en|de)/assets(.*)$ /assets$2 break;
rewrite ^/(en|de)/webfonts(.*)$ /webfonts$2 break;
if (!-e $request_filename){
rewrite ^/(en|de)?/?(.*)$ /index.php?cultureKey=$1&q=$2 last;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment