Skip to content

Commit

Permalink
Remove firefox.com.cn redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgibson committed Apr 29, 2024
1 parent 98fe969 commit b0ab561
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
7 changes: 2 additions & 5 deletions bedrock/base/templates/includes/canonical-url.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@
<link rel="alternate" hreflang="sv" href="{{ settings.CANONICAL_URL + '/' + code + loop_canonical_path }}" title="Svenska">
<link rel="alternate" hreflang="sv-SE" href="{{ settings.CANONICAL_URL + '/' + code + loop_canonical_path }}" title="{{ label|safe }}">
{% elif code == 'zh-CN' -%}
{#- Bug 1448875: /zh-CN/ home page redirects to https://www.firefox.com.cn/ -#}
{% if loop_canonical_path != '/' -%}
<link rel="alternate" hreflang="zh" href="{{ settings.CANONICAL_URL + '/' + code + loop_canonical_path }}" title="中文">
<link rel="alternate" hreflang="zh-CN" href="{{ settings.CANONICAL_URL + '/' + code + loop_canonical_path }}" title="{{ label|safe }}">
{% endif -%}
<link rel="alternate" hreflang="zh" href="{{ settings.CANONICAL_URL + '/' + code + loop_canonical_path }}" title="中文">
<link rel="alternate" hreflang="zh-CN" href="{{ settings.CANONICAL_URL + '/' + code + loop_canonical_path }}" title="{{ label|safe }}">
{% elif code|length != 3 -%}{#- Bug 1364470: Drop ISO 639-2 and -3 locales not supported by Google -#}
<link rel="alternate" hreflang="{{ code }}" href="{{ settings.CANONICAL_URL + '/' + code + loop_canonical_path }}" title="{{ label|safe }}">
{% endif -%}
Expand Down
2 changes: 0 additions & 2 deletions bedrock/mozorg/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ def decider(request, **kwargs):


redirectpatterns = (
# bug 755826, 1222348, 1416798
redirect(r"^zh-CN/?$", "https://www.firefox.com.cn/", locale_prefix=False, query={"utm_medium": "referral", "utm_source": "mozilla.org"}),
# bug 874913, 681572
redirect(r"^(products/)?download\.html", "firefox.new", query=""),
# bug 845580
Expand Down
2 changes: 0 additions & 2 deletions tests/redirects/map_globalconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
# bug 845988 - remove double slashes in URLs
url_test("/en-US/firefox//all/", "/en-US/firefox/all/"),
url_test("/pt-BR/////thunderbird/", "/pt-BR/thunderbird/"),
# bug 755826, 1222348, 1416798
url_test("/zh-CN/", "https://www.firefox.com.cn/", query={"utm_medium": "referral", "utm_source": "mozilla.org"}),
# bug 874913
url_test("/en-US/{,products/}download.html{,?stuff=whatnot}", "/en-US/firefox/new/"),
url_test("/{,products/}download.html{,?stuff=whatnot}", "/firefox/new/"),
Expand Down

0 comments on commit b0ab561

Please sign in to comment.