Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/web/templates/site.conf.erb

Issue 29538581: #3421 - Do root rewrite before rewriting to translated page (Closed) Base URL: https://hg1/infrastructure
Patch Set: Created Sept. 7, 2017, 8:41 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/web/templates/site.conf.erb
===================================================================
--- a/modules/web/templates/site.conf.erb
+++ b/modules/web/templates/site.conf.erb
@@ -13,6 +13,12 @@
{
expires 1d;
+ # Redirect server/language root
+
+ rewrite ^/$ /$index_page last;
+ rewrite ^/(\w\w(_\w\w)?)$ /$1/ permanent;
+ rewrite ^/(\w\w(_\w\w)?)/$ /$1/$index_page last;
+
# Match Accept-Language header against available languages
set $preferredLang en;
@@ -47,11 +53,6 @@
rewrite ^(.*) /en$1 last;
}
- # Redirect server/language root
-
- rewrite ^/$ /$index_page last;
- rewrite ^/(\w\w(_\w\w)?)$ /$1/ permanent;
- rewrite ^/(\w\w(_\w\w)?)/$ /$1/$index_page last;
}
# http://hub.eyeo.com/issues/3299 Redirect missing translations to default
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld