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

Delta Between Two Patch Sets: modules/web/templates/site.erb

Issue 5451980818350080: Web server config: redirect canonical URLs to language-specific versions (Closed)
Left Patch Set: Created Dec. 12, 2013, 8:06 a.m.
Right Patch Set: Fixed a mistake Created Dec. 12, 2013, 8:11 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 server 1 server
2 { 2 {
3 listen 80 default_server; 3 listen 80 default_server;
4 listen [::]:80 default_server; 4 listen [::]:80 default_server;
5 server_name '<%= vhost %>'; 5 server_name '<%= vhost %>';
6 6
7 location / 7 location /
8 { 8 {
9 rewrite (.*) https://<%= vhost %>$1 permanent; 9 rewrite (.*) https://<%= vhost %>$1 permanent;
10 } 10 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (-d $request_filename) 65 if (-d $request_filename)
66 { 66 {
67 break; 67 break;
68 } 68 }
69 69
70 # Redirect canonical URLs to language-specific versions 70 # Redirect canonical URLs to language-specific versions
71 71
72 set $canonical $uri; 72 set $canonical $uri;
73 if ($canonical ~ ^(.*?)\?) 73 if ($canonical ~ ^(.*?)\?)
74 { 74 {
75 75 set $canonical $1;
76 } 76 }
77 77
78 if (-f $document_root/$preferredLang$canonical) 78 if (-f $document_root/$preferredLang$canonical)
79 { 79 {
80 rewrite ^ /$preferredLang$canonical last; 80 rewrite ^ /$preferredLang$canonical last;
81 } 81 }
82 if (-f $document_root/en$canonical) 82 if (-f $document_root/en$canonical)
83 { 83 {
84 rewrite ^ /en$canonical last; 84 rewrite ^ /en$canonical last;
85 } 85 }
86 } 86 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld