Index: modules/adblockplusorg/files/adblockplus.org |
=================================================================== |
--- a/modules/adblockplusorg/files/adblockplus.org |
+++ b/modules/adblockplusorg/files/adblockplus.org |
@@ -16,12 +16,23 @@ |
set $preferredLang en; |
} |
- if ($arg_a ~ ^(view|show)?$) { |
- rewrite ^/(index\.html)?$ /$preferredLang/? redirect; |
- rewrite ^/(\w\w(_\w\w)?)$ /$1/ redirect; |
+ if ($http_user_agent ~ \bChrome/\d+) { |
+ set $browser "chrome"; |
+ } |
+ if ($http_user_agent ~ \bPresto/\d+) { |
+ set $browser "opera"; |
+ } |
+ if ($http_user_agent !~ \bChrome/\d+) { |
Wladimir Palant
2012/12/19 11:16:39
Actually, it wasn't broken before - a rewrite stat
Felix Dahlke
2012/12/19 11:45:30
Right, didn't think there. I presumed this was jus
|
+ set $browser "firefox"; |
} |
- rewrite ^/(\w\w)/installation$ /$1/ permanent; |
+ if ($arg_a ~ ^(view|show)?$) { |
+ rewrite ^/(index\.html)?$ /$preferredLang/#$browser redirect; |
+ rewrite ^/(\w\w(_\w\w)?)$ /$1/#$browser redirect; |
+ } |
+ |
+ rewrite ^/(\w\w(_\w\w)?)/(firefox|chrome|opera) /$1/#$3 permanent; |
Wladimir Palant
2012/12/19 11:16:39
Also android.
|
+ rewrite ^/(\w\w(_\w\w)?)/installation$ /$1/ permanent; |
Felix Dahlke
2012/12/19 10:32:09
This one I did fix while I was at it.
Wladimir Palant
2012/12/19 11:16:39
Actually, I think that zh_CN was only added after
|
rewrite ^/anwiki/(.*) /$1 permanent; |
if (-f $request_filename) { |
@@ -31,16 +42,6 @@ |
break; |
} |
- if ($http_user_agent ~ \bChrome/\d+) { |
- rewrite ^/(\w\w(_\w\w)?)/?$ /$1/chrome; |
- } |
- if ($http_user_agent ~ \bPresto/\d+) { |
- rewrite ^/(\w\w(_\w\w)?)/?$ /$1/opera; |
- } |
- if ($http_user_agent !~ \bChrome/\d+) { |
- rewrite ^/(\w\w(_\w\w)?)/?$ /$1/firefox; |
- } |
- |
set $static ""; |
if (-f "$document_root/static$uri") { |
set $static "ok"; |