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

Side by Side Diff: modules/web/templates/site.conf.erb

Issue 4822862858813440: Issue 2472 - Have https://eyeo.com/jobs redirect properly (Closed)
Patch Set: Created May 7, 2015, 7:49 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 expires 1d; 1 expires 1d;
2 2
3 root /var/www/<%= vhost %>; 3 root /var/www/<%= vhost %>;
4 index index; 4 index index;
5 default_type text/html; 5 default_type text/html;
6 charset utf-8; 6 charset utf-8;
7 7
8 set $index_page "index"; 8 set $index_page "index";
9 9
10 <% if @custom_config %> 10 <% if @custom_config %>
(...skipping 18 matching lines...) Expand all
29 # Redirect canonical URLs to language-specific versions 29 # Redirect canonical URLs to language-specific versions
30 30
31 if (-f "$document_root/${preferredLang}_$preferredRegion$uri") 31 if (-f "$document_root/${preferredLang}_$preferredRegion$uri")
32 { 32 {
33 rewrite ^(.*) /${preferredLang}_$preferredRegion$1 last; 33 rewrite ^(.*) /${preferredLang}_$preferredRegion$1 last;
34 } 34 }
35 if (-f "$document_root/$preferredLang$uri") 35 if (-f "$document_root/$preferredLang$uri")
36 { 36 {
37 rewrite ^(.*) /$preferredLang$1 last; 37 rewrite ^(.*) /$preferredLang$1 last;
38 } 38 }
39 if (-f "$document_root/en$uri/$index_page")
40 {
41 rewrite ^(.*) /en$1 last;
Wladimir Palant 2015/05/08 21:06:05 So people will always be redirected to the English
kzar 2015/05/08 22:01:42 Shucks, good point. Done.
42 }
39 if (-f "$document_root/en$uri") 43 if (-f "$document_root/en$uri")
40 { 44 {
41 rewrite ^(.*) /en$1 last; 45 rewrite ^(.*) /en$1 last;
42 } 46 }
43 47
44 # Redirect server/language root 48 # Redirect server/language root
45 49
46 rewrite ^/$ /$index_page last; 50 rewrite ^/$ /$index_page last;
47 rewrite ^/(\w\w(_\w\w)?)$ /$1/ permanent; 51 rewrite ^/(\w\w(_\w\w)?)$ /$1/ permanent;
48 rewrite ^/(\w\w(_\w\w)?)/$ /$1/$index_page last; 52 rewrite ^/(\w\w(_\w\w)?)/$ /$1/$index_page last;
49 } 53 }
50 54
51 <% if @multiplexer_locations %> 55 <% if @multiplexer_locations %>
52 <% @multiplexer_locations.each do |location| %> 56 <% @multiplexer_locations.each do |location| %>
53 location <%= location %> 57 location <%= location %>
54 { 58 {
55 fastcgi_pass unix:/tmp/multiplexer-fastcgi.sock; 59 fastcgi_pass unix:/tmp/multiplexer-fastcgi.sock;
56 include /etc/nginx/fastcgi_params; 60 include /etc/nginx/fastcgi_params;
57 } 61 }
58 <% end %> 62 <% end %>
59 <% end %> 63 <% end %>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld