[fix bug 1209643] Links from foundation/moco result in 404

This commit is contained in:
Alex Gibson 2015-10-01 13:39:57 +01:00
Родитель 9acc5b90b6
Коммит 3951308ce9
4 изменённых файлов: 20 добавлений и 10 удалений

Просмотреть файл

@ -59,7 +59,7 @@
<h2>{{ _('Documents') }}</h2>
<ul>
<li><a href="/legal/articles.html">{{ _('Articles of Incorporation') }}</a></li>
<li><a href="/legal/bylaws.html">{{ _('Bylaws of the Mozilla Corporation') }}</a></li>
<li><a href="{{ url('foundation.documents.articles-of-incorporation') }}">{{ _('Articles of Incorporation') }}</a></li>
<li><a href="{{ url('foundation.documents.bylaws') }}">{{ _('Bylaws of the Mozilla Corporation') }}</a></li>
</ul>
{% endblock %}

Просмотреть файл

@ -222,6 +222,12 @@ redirectpatterns = (
redirect(r'^legal/eula/firefox-2/?$', '/about/legal/eula/firefox-2/'),
redirect(r'^legal/eula/firefox-3/?$', '/about/legal/eula/firefox-3/'),
# Bug 1209643
redirect(r'^legal/bylaws_amendment_(?P<n>[12])(\.html|/)?', '/foundation/documents/bylaws-amendment-{n}/'),
redirect(r'^legal/articles(\.html|/)?', 'foundation.documents.articles-of-incorporation'),
redirect(r'^legal/amendment(\.html|/)?', 'foundation.documents.articles-of-incorporation-amendment'),
redirect(r'^legal/bylaws(\.html|/)?', 'foundation.documents.bylaws'),
# Bug 1073269 /dnt/ -> /firefox/dnt/
redirect(r'^dnt/?$', 'firefox.dnt'),

Просмотреть файл

@ -498,12 +498,11 @@ RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/documents/(index|mozilla-200.-fin
# bug 442671
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/trademarks/l10n-policy(/?)$ /$1foundation/trademarks/ [L,R=301]
# bug 960689
RewriteRule ^/en-US/legal/bylaws_amendment_1(?:\.html)?$ /foundation/documents/bylaws-amendment-1/ [L,R=301]
RewriteRule ^/en-US/legal/bylaws_amendment_2(?:\.html)?$ /foundation/documents/bylaws-amendment-2/ [L,R=301]
RewriteRule ^/en-US/legal/articles(?:\.html)?$ /foundation/documents/articles-of-incorporation/ [L,R=301]
RewriteRule ^/en-US/legal/amendment(?:\.html)?$ /foundation/documents/articles-of-incorporation/amendment/ [L,R=301]
RewriteRule ^/en-US/legal/bylaws(?:\.html)?$ /foundation/documents/bylaws/ [L,R=301]
# bug 960689, 1209643
RewriteRule ^(/(\w{2,3}(?:-\w{2})?/)?legal/bylaws_amendment_(?:[12])(?:\.html)?)$ /b$1 [PT]
RewriteRule ^(/(\w{2,3}(?:-\w{2})?/)?legal/articles(?:\.html)?)$ /b$1 [PT]
RewriteRule ^(/(\w{2,3}(?:-\w{2})?/)?legal/amendment(?:\.html)?)$ /b$1 [PT]
RewriteRule ^(/(\w{2,3}(?:-\w{2})?/)?legal/bylaws(?:\.html)?)$ /b$1 [PT]
# Add /b to all foundation URLs to serve them from Bedrock.
@ -750,5 +749,3 @@ RewriteRule ^(/rhino(/.*)?)$ /b$1 [PT]
# Bug 730488 deprecate /firefox/all-older.html
RewriteRule ^(/(?:\w{2,3}(?:-\w{2})?/)?firefox/all-older\.html)$ /b$1 [PT]

Просмотреть файл

@ -761,4 +761,11 @@ URLS = flatten((
# Bug 730488 deprecate /firefox/all-older.html
url_test('/firefox/all-older.html', '/firefox/new/'),
# Bug 1209643
url_test('/legal/bylaws_amendment_1.html', '/foundation/documents/bylaws-amendment-1/'),
url_test('/legal/bylaws_amendment_2.html', '/foundation/documents/bylaws-amendment-2/'),
url_test('/legal/articles.html', '/foundation/documents/articles-of-incorporation/'),
url_test('/legal/amendment.html', '/foundation/documents/articles-of-incorporation/amendment/'),
url_test('/legal/bylaws.html', '/foundation/documents/bylaws/'),
))