Index: modules/web/templates/site.conf.erb |
=================================================================== |
--- a/modules/web/templates/site.conf.erb |
+++ b/modules/web/templates/site.conf.erb |
@@ -54,6 +54,22 @@ |
rewrite ^/(\w\w(_\w\w)?)/$ /$1/$index_page last; |
} |
+# http://hub.eyeo.com/issues/3299 Redirect missing translations to default |
+location ~ ^/([a-z][a-z])(/.+) { |
+ if (!-e "$document_root$uri") |
+ { |
+ rewrite ^/([a-z][a-z])(/.+) $2 redirect; |
+ } |
+} |
+ |
+# http://hub.eyeo.com/issues/3299 Redirect missing translations to default |
+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
|
+ if (!-e "$document_root$uri") |
+ { |
+ rewrite ^/([a-z][a-z]\_[A-Z][A-Z])(/.+) $2 redirect; |
f.nicolaisen
2017/09/06 23:00:19
Lots of duplication here :(
|
+ } |
+} |
+ |
<% if @multiplexer_locations %> |
<% @multiplexer_locations.each do |location| %> |
location <%= location %> |