Skip to content

Commit

Permalink
Update redirects that use anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
robhudson committed Jun 17, 2024
1 parent ff814ba commit 6ff52e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions bedrock/firefox/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ def mobile_app(request, *args, **kwargs):
redirectpatterns = (
# overrides
# issue 8096
redirect(r"^firefox/beta/all/?$", "firefox.all", anchor="product-desktop-beta"),
redirect(r"^firefox/developer/all/?$", "firefox.all", anchor="product-desktop-developer"),
redirect(r"^firefox/aurora/all/?$", "firefox.all", anchor="product-desktop-developer"),
redirect(r"^firefox/nightly/all/?$", "firefox.all", anchor="product-desktop-nightly"),
redirect(r"^firefox/organizations/all/?$", "firefox.all", anchor="product-desktop-esr"),
redirect(r"^firefox/android/all/?$", "firefox.all", anchor="product-android-release"),
redirect(r"^firefox/android/beta/all/?$", "firefox.all", anchor="product-android-beta"),
redirect(r"^firefox/android/nightly/all/?$", "firefox.all", anchor="product-android-nightly"),
redirect(r"^firefox/beta/all/?$", "firefox.all.platforms", to_args=["desktop-beta"]),
redirect(r"^firefox/developer/all/?$", "firefox.all.platforms", to_args=["desktop-developer"]),
redirect(r"^firefox/aurora/all/?$", "firefox.all.platforms", to_args=["desktop-developer"]),
redirect(r"^firefox/nightly/all/?$", "firefox.all.platforms", to_args=["desktop-nightly"]),
redirect(r"^firefox/organizations/all/?$", "firefox.all.platforms", to_args=["desktop-esr"]),
redirect(r"^firefox/android/all/?$", "firefox.all.platforms", to_args=["android-release"]),
redirect(r"^firefox/android/beta/all/?$", "firefox.all.platforms", to_args=["android-beta"]),
redirect(r"^firefox/android/nightly/all/?$", "firefox.all.platforms", to_args=["android-nightly"]),
# bug 831810 & 1142583 & 1239960, 1329931
redirect(r"^mwc/?$", "https://support.mozilla.org/products/firefox-os", re_flags="i"),
# bug 748503
Expand Down Expand Up @@ -114,10 +114,10 @@ def mobile_app(request, *args, **kwargs):
# bug 727561
redirect(r"^firefox/search(?:\.html)?$", "firefox.new"),
# bug 860865, 1101220, issue 8096
redirect(r"^firefox/all-(?:beta|rc)(?:/|\.html)?$", "firefox.all", anchor="product-desktop-beta"),
redirect(r"^firefox/all-aurora(?:/|\.html)?$", "firefox.all", anchor="product-desktop-developer"),
redirect(r"^firefox/all-(?:beta|rc)(?:/|\.html)?$", "firefox.all.platforms", to_args=["desktop-beta"]),
redirect(r"^firefox/all-aurora(?:/|\.html)?$", "firefox.all.platforms", to_args=["desktop-developer"]),
redirect(r"^firefox/aurora/(?P<page>all|notes|system-requirements)/?$", "/firefox/developer/{page}/"),
redirect(r"^firefox/organizations/all\.html$", "firefox.all", anchor="product-desktop-esr"),
redirect(r"^firefox/organizations/all\.html$", "firefox.all.platforms", to_args=["desktop-esr"]),
# bug 729329
redirect(r"^mobile/sync", "firefox.features.sync"),
# bug 882845
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</p>

<small class="fx-unsupported-message-all-link">
<a href="{{ url('firefox.all') }}#product-desktop-esr">
<a href="{{ firefox_url('desktop', 'all', 'esr') }}>
{{ ftl('download-a-different-build') }}
</a>
</small>
Expand Down
4 changes: 2 additions & 2 deletions tests/redirects/map_globalconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
url_test("/firefox/nightly/all/", "/firefox/all/desktop-nightly/"),
url_test("/firefox/organizations/all/", "/firefox/all/desktop-esr/"),
url_test("/firefox/android/all/", "/firefox/all/android-release/"),
url_test("/firefox/android/beta/all/", "/firefox/all/android-beta"),
url_test("/firefox/android/nightly/all/", "/firefox/all/android-nightly"),
url_test("/firefox/android/beta/all/", "/firefox/all/android-beta/"),
url_test("/firefox/android/nightly/all/", "/firefox/all/android-nightly/"),
url_test("/projects/firefox/3.6.10/whatsnew/bunny-lebowski/", "/firefox/3.6.10/whatsnew/bunny-lebowski/"),
url_test("/projects/firefox/4.0/firstrun/", "/firefox/4.0/firstrun/"),
url_test("/projects/firefox/4.0a2/firstrun/stuff", "/firefox/nightly/firstrun/stuff"),
Expand Down

0 comments on commit 6ff52e8

Please sign in to comment.