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

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

Issue 29347268: Issue 4040 - Introduce new language-specific redirects (Closed)
Patch Set: Created July 4, 2016, 1:39 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 47b92409c2f658611df951e677d3bb6071d7a453..7b934984a73749f189d9f503b9d139c6ebb3a26f 100644
--- a/modules/web/templates/adblockplus.org.conf.erb
+++ b/modules/web/templates/adblockplus.org.conf.erb
@@ -94,6 +94,13 @@ location /redirect
set $adblock_browser_android_download "https://downloads.adblockplus.org/adblockbrowser-1.1.0-arm.apk";
set $adblock_browser_android_store "https://play.google.com/store/apps/details?id=org.adblockplus.browser";
+ set $lang "en";
+
+ if ($arg_lang ~ ^(\w+))
+ {
+ set $lang $1;
+ }
+
# 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')
@@ -139,7 +146,11 @@ location /redirect
}
if ($arg_link = "adblock_browser_android_support")
{
- rewrite ^ https://adblockbrowser.org/en/android-support/? redirect;
+ rewrite ^ https://adblockbrowser.org/$lang/android-support/? redirect;
+ }
+ if ($arg_link = "adblock_browser_android_faq")
+ {
+ rewrite ^ https://adblockbrowser.org/$lang/android-support/faq? redirect;
}
if ($arg_link = "adblock_browser_ios_support")
{
@@ -170,7 +181,6 @@ location /redirect
rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.adblockplussbrowser? redirect;
}
- set $lang "en";
set $link "";
set $anchor "";
@@ -204,6 +214,10 @@ location /redirect
set $link "privacy";
set $anchor "#abp_issue_reporter";
}
+ if ($arg_link = "privacy")
+ {
+ set $link "privacy";
+ }
if ($arg_link = "contribute")
{
set $link "contribute";
@@ -231,10 +245,6 @@ location /redirect
return 404;
}
- if ($arg_lang ~ ^(\w+))
- {
- set $lang $1;
- }
if (!-f "$document_root/$lang/$link")
{
set $lang "!!";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld