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

Unified Diff: modules/web/templates/adblockplus.org.conf.erb

Issue 29329111: Issue 3094 - Redirect CN requests to browser download page (Closed)
Patch Set: Created Oct. 14, 2015, 1:32 p.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/adblockplus.org.conf.erb
diff --git a/modules/web/templates/adblockplus.org.conf.erb b/modules/web/templates/adblockplus.org.conf.erb
index 208a2f4337aeaa44037268ebaf0690d63d976582..467ad6a0ac23dc6764665bf39b064c2bf30023d6 100644
--- a/modules/web/templates/adblockplus.org.conf.erb
+++ b/modules/web/templates/adblockplus.org.conf.erb
@@ -91,6 +91,16 @@ rewrite ^/(\w\w(_\w\w)?/)?adblock-browser/?$ https://adblockbrowser.org/ permane
location /redirect
{
+ set $adblock_browser_android_download "https://downloads.adblockplus.org/adblockbrowser-1.0.0-arm.apk";
+ set $adblock_browser_android_store "https://play.google.com/store/apps/details?id=org.adblockplus.browser";
+
+ # Google Play is not available in China, so we redirect them to the
+ # builds for download, see https://issues.adblockplus.org/ticket/3094
+ if ($geoip_country_code = 'CN')
+ {
+ set $adblock_browser_android_store $adblock_browser_android_download;
+ }
+
if ($arg_link = "reporter_connect_issue")
{
rewrite ^ /forum/? redirect;
@@ -133,7 +143,7 @@ location /redirect
}
if ($arg_link = "adblock_browser_android_store")
{
- rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.browser? redirect;
+ rewrite ^ $adblock_browser_android_store? redirect;
}
if ($arg_link = "adblock_browser_ios_store")
{
@@ -141,7 +151,7 @@ location /redirect
}
if ($arg_link = "adblock_browser_android_download")
{
- rewrite ^ https://downloads.adblockplus.org/adblockbrowser-1.0.0-arm.apk? redirect;
+ rewrite ^ $adblock_browser_android_download? redirect;
}
if ($arg_link = "adblock_plus_safari_ios_support")
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld