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

Delta Between Two Patch Sets: modules/adblockplusorg/files/adblockplus.org

Issue 9103016: Fix url-based rewrites (Closed)
Left Patch Set: Created Jan. 2, 2013, 2:58 p.m.
Right Patch Set: Made browser rewriting work for /en/ etc. Created Jan. 9, 2013, 10:43 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 root /var/www/adblockplus.org/httpdocs; 2 root /var/www/adblockplus.org/httpdocs;
3 3
4 location / { 4 location / {
5 index index.php index index.html; 5 index index.php index index.html;
6 6
7 if ($arg_a = "view") { 7 if ($arg_a = "view") {
8 rewrite ^(.*) $1? permanent; 8 rewrite ^(.*) $1? permanent;
9 } 9 }
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 if ($http_user_agent ~ \bPresto/\d+) { 23 if ($http_user_agent ~ \bPresto/\d+) {
24 set $browser "opera"; 24 set $browser "opera";
25 } 25 }
26 if ($http_user_agent ~ \bAndroid\s.*\bAppleWebKit/\d+) { 26 if ($http_user_agent ~ \bAndroid\s.*\bAppleWebKit/\d+) {
27 set $browser "android"; 27 set $browser "android";
28 } 28 }
29 29
30 if ($arg_a ~ ^(view|show)?$) { 30 if ($arg_a ~ ^(view|show)?$) {
31 rewrite ^/(index\.html)?$ /$preferredLang/$browser redirect; 31 rewrite ^/(index\.html)?$ /$preferredLang/$browser redirect;
32 rewrite ^/(\w\w(_\w\w)?)$ /$1/$browser redirect; 32 rewrite ^/(\w\w(_\w\w)?)/?$ /$1/$browser redirect;
33 } 33 }
34 34
35 rewrite ^/(\w\w(_\w\w)?)/installation$ /$1/ permanent; 35 rewrite ^/(\w\w(_\w\w)?)/installation$ /$1/ permanent;
36 rewrite ^/anwiki/(.*) /$1 permanent; 36 rewrite ^/anwiki/(.*) /$1 permanent;
37 37
38 if (-f $request_filename) { 38 if (-f $request_filename) {
39 break; 39 break;
40 } 40 }
41 if (-d $request_filename) { 41 if (-d $request_filename) {
42 break; 42 break;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 fastcgi_param GATEWAY_INTERFACE CGI/1.1; 108 fastcgi_param GATEWAY_INTERFACE CGI/1.1;
109 fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 109 fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
110 110
111 fastcgi_param REMOTE_ADDR $remote_addr; 111 fastcgi_param REMOTE_ADDR $remote_addr;
112 fastcgi_param REMOTE_PORT $remote_port; 112 fastcgi_param REMOTE_PORT $remote_port;
113 fastcgi_param SERVER_ADDR $server_addr; 113 fastcgi_param SERVER_ADDR $server_addr;
114 fastcgi_param SERVER_PORT $server_port; 114 fastcgi_param SERVER_PORT $server_port;
115 fastcgi_param SERVER_NAME $server_name; 115 fastcgi_param SERVER_NAME $server_name;
116 } 116 }
117 } 117 }
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