Left: | ||
Right: |
OLD | NEW |
---|---|
1 root /var/www/<%= @vhost %>; | 1 root /var/www/<%= @vhost %>; |
2 index index; | 2 index index; |
3 default_type text/html; | 3 default_type text/html; |
4 charset utf-8; | 4 charset utf-8; |
5 | 5 |
6 set $index_page "index"; | 6 set $index_page "index"; |
7 | 7 |
8 <% if @custom_config %> | 8 <% if @custom_config %> |
9 <%= @custom_config %> | 9 <%= @custom_config %> |
10 <% end %> | 10 <% end %> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 rewrite ^(.*) /en$1 last; | 47 rewrite ^(.*) /en$1 last; |
48 } | 48 } |
49 | 49 |
50 # Redirect server/language root | 50 # Redirect server/language root |
51 | 51 |
52 rewrite ^/$ /$index_page last; | 52 rewrite ^/$ /$index_page last; |
53 rewrite ^/(\w\w(_\w\w)?)$ /$1/ permanent; | 53 rewrite ^/(\w\w(_\w\w)?)$ /$1/ permanent; |
54 rewrite ^/(\w\w(_\w\w)?)/$ /$1/$index_page last; | 54 rewrite ^/(\w\w(_\w\w)?)/$ /$1/$index_page last; |
55 } | 55 } |
56 | 56 |
57 # http://hub.eyeo.com/issues/3299 Redirect missing translations to default | |
58 location ~ ^/([a-z][a-z])(/.+) { | |
59 if (!-e "$document_root$uri") | |
60 { | |
61 rewrite ^/([a-z][a-z])(/.+) $2 redirect; | |
62 } | |
63 } | |
64 | |
65 # http://hub.eyeo.com/issues/3299 Redirect missing translations to default | |
66 location ~ ^/([a-z][a-z]\_[A-Z][A-Z])(/.+) { | |
f.nicolaisen
2017/09/06 23:00:19
It would be cool if we could join both these locat
| |
67 if (!-e "$document_root$uri") | |
68 { | |
69 rewrite ^/([a-z][a-z]\_[A-Z][A-Z])(/.+) $2 redirect; | |
f.nicolaisen
2017/09/06 23:00:19
Lots of duplication here :(
| |
70 } | |
71 } | |
72 | |
57 <% if @multiplexer_locations %> | 73 <% if @multiplexer_locations %> |
58 <% @multiplexer_locations.each do |location| %> | 74 <% @multiplexer_locations.each do |location| %> |
59 location <%= location %> | 75 location <%= location %> |
60 { | 76 { |
61 fastcgi_pass unix:/tmp/multiplexer-fastcgi.sock; | 77 fastcgi_pass unix:/tmp/multiplexer-fastcgi.sock; |
62 include /etc/nginx/fastcgi_params; | 78 include /etc/nginx/fastcgi_params; |
63 } | 79 } |
64 <% end %> | 80 <% end %> |
65 <% end %> | 81 <% end %> |
OLD | NEW |