[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tpo/master] Redirect dist for mirrors
commit b60739ffc7094da9b55a500d32d4978ae0d8e777
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date: Tue Oct 1 19:25:25 2019 +0200
Redirect dist for mirrors
---
.htaccess | 4 +++-
content/press/new-release-tor-browser/contents.lr | 2 +-
templates/hero-download.html | 2 +-
templates/macros/downloads.html | 8 ++++----
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/.htaccess b/.htaccess
index c476b56..f9fe507 100644
--- a/.htaccess
+++ b/.htaccess
@@ -16,6 +16,8 @@ RewriteRule ^images/how_tor_works_thumb.png$ https://2019.www.torproject.org/ima
RewriteRule ^about/findoc(.*) /static/findoc$1 [R=302,L]
RewriteRule ^about/corepeople$ /about/people/ [R=302,L]
+# dist (for mirrors)
+RewriteRule ^dist/(.*) https://dist.torproject.org/$1 [R=302,L]
# moved to /docs/
RewriteRule ^docs/(.*) https://2019.www.torproject.org/docs/$1 [R=302,L]
@@ -26,7 +28,7 @@ RewriteRule ^torbutton/design(.*) https://2019.www.torproject.org/docs/torbutton
RewriteRule ^torbutton/(.*) https://2019.www.torproject.org/docs/torbutton/$1 [R=302,L]
# Tor Browser
-RewriteRule ^torbrowser/dist/(.*) https://2019.www.torproject.org//dist/torbrowser/$1 [R=302,L]
+RewriteRule ^torbrowser/dist/(.*) https://2019.www.torproject.org/dist/torbrowser/$1 [R=302,L]
RewriteRule ^torbrowser(.*) https://2019.www.torproject.org/projects/torbrowser.html.en [R=302,L]
RewriteRule ^torbrowser$ https://2019.www.torproject.org/projects/torbrowser.html.en [R=302,L]
diff --git a/content/press/new-release-tor-browser/contents.lr b/content/press/new-release-tor-browser/contents.lr
index 1aebc49..feb1c03 100644
--- a/content/press/new-release-tor-browser/contents.lr
+++ b/content/press/new-release-tor-browser/contents.lr
@@ -12,6 +12,6 @@ link: https://blog.torproject.org/new-release-tor-browser-85a10
---
summary:
-Tor Browser 8.5a10 is now available from the <a href="https://www.torproject.org/projects/torbrowser.html.en#downloads-alpha">Tor Browser Project page</a> and also from our <a href="https://www.torproject.org/dist/torbrowser/8.5a10/">distribution directory</a>.
+Tor Browser 8.5a10 is now available from the <a href="https://www.torproject.org/projects/torbrowser.html.en#downloads-alpha">Tor Browser Project page</a> and also from our <a href="/dist/torbrowser/8.5a10/">distribution directory</a>.
---
body:
diff --git a/templates/hero-download.html b/templates/hero-download.html
index 9cfb65a..a13fb08 100644
--- a/templates/hero-download.html
+++ b/templates/hero-download.html
@@ -10,7 +10,7 @@
<div class="oval-2 bg-darker mx-auto">
{% set alt_l = alt %}
{% set t = bag('versions', 'torbrowser-stable') %}
- {% set download_prefix = 'https://www.torproject.org/dist/torbrowser/' + t.version + '/' %}
+ {% set download_prefix = '/dist/torbrowser/' + t.version + '/' %}
{% if alt_l == 'en' %}
{% set alt_l = 'en-US' %}
{% elif alt_l == 'es' %}
diff --git a/templates/macros/downloads.html b/templates/macros/downloads.html
index 7581aca..1ca65ad 100644
--- a/templates/macros/downloads.html
+++ b/templates/macros/downloads.html
@@ -1,5 +1,5 @@
{% macro render_windows(version, alt) %}
- {% set download_prefix = 'https://www.torproject.org/dist/torbrowser/' + version + '/' %}
+ {% set download_prefix = '/dist/torbrowser/' + version + '/' %}
{% if alt == 'en' %}
{% set alt = 'en-US' %}
{% elif alt == 'es' %}
@@ -14,7 +14,7 @@
{% endmacro %}
{% macro render_windows_expert(version, win32) %}
- {% set download_prefix = 'https://www.torproject.org/dist/torbrowser/' + version + '/' %}
+ {% set download_prefix = '/dist/torbrowser/' + version + '/' %}
{% set download_link_32 = download_prefix + 'tor-win32-' + win32 + '.zip' %}
{% set sig_link_32 = download_link_32 + '.asc' %}
@@ -22,7 +22,7 @@
{% endmacro %}
{% macro render_mac(version, alt) %}
- {% set download_prefix = 'https://www.torproject.org/dist/torbrowser/' + version + '/' %}
+ {% set download_prefix = '/dist/torbrowser/' + version + '/' %}
{% if alt == 'en' %}
{% set alt = 'en-US' %}
{% elif alt == 'es' %}
@@ -35,7 +35,7 @@
{% endmacro %}
{% macro render_linux(version, alt) %}
- {% set download_prefix = 'https://www.torproject.org/dist/torbrowser/' + version + '/' %}
+ {% set download_prefix = '/dist/torbrowser/' + version + '/' %}
{% if alt == 'en' %}
{% set alt = 'en-US' %}
{% elif alt == 'es' %}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits