Commit 630f0c17 authored by totten's avatar totten

Move more redirect rules to nginx config file. Reduce load.

parent 1beaea79
## Several subdirectories map cleanly to gcloud bucket.
rewrite ^/(civicrm-l10n-core|civix|cv|git-scan|civistrings|amp|joomlatools-console)/(.*)$ https://storage.googleapis.com/civicrm/$1/$2 last;
location / {
try_files $uri @rewrite;
}
location @rewrite {
## Primary tarballs in the root don't map cleanly.
rewrite ^/(.*)$ /index.php?q=$1;
}
......@@ -5,14 +5,7 @@ server {
listen [::]:80;
root /var/www/example.com/web;
location / {
try_files $uri @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
include /var/www/example.com/nginx.common.conf;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
......
......@@ -12,9 +12,6 @@ function pick_url($path) {
return "$base/civicrm-stable/$version/$path";
}
}
if (preg_match(';^(civicrm-l10n-core|civix|cv|git-scan|civistrings|amp|joomlatools-console)/;', $path)) {
return "$base/$path";
}
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment