Normalize page redirections

Use a fallback HTML page with a manual and javascript redirect
Keep canonical pages only for alerts
This commit is contained in:
Saivann 2013-10-14 14:59:10 -04:00
parent b988ce349c
commit 3da682b36b
11 changed files with 69 additions and 54 deletions

View file

@ -2,10 +2,12 @@
layout: base
lang: en
---
{% if page.redirect != nil %}
<script>window.location.href='/en/alert/{{ page.redirect }}';</script>
<link rel="canonical" href="http://bitcoin.org/en/alert/{{ page.redirect }}"/>
{% if page.canonical != nil %}
<script>window.location.href='{{ page.canonical }}';</script>
<link rel="canonical" href="http://bitcoin.org{{ page.canonical }}"/>
{% endif %}
<link rel="alternate" type="application/rss+xml" href="/en/rss/alerts.rss" title="Bitcoin network status and alerts">
<div class="alerttext">
<h1>{{ page.title }}<br><small>{{ page.date | date:"%e %B %Y" }}</small></h1>

11
_layouts/redirect.html Normal file
View file

@ -0,0 +1,11 @@
---
layout: base
---
<meta name="robots" content="noindex">
<script>window.location.href='{{ page.redirect }}';</script>
<div class="redirectmsg">
<h1>This page has been moved</h1>
<p><a href="{{ page.redirect }}">bitcoin.org{{ page.redirect }}</a></p>
</div>

View file

@ -2,10 +2,6 @@
layout: base
lang: en
---
{% if page.redirect != nil %}
<script>window.location.href='/en/release/{{ page.redirect }}';</script>
<link rel="canonical" href="http://bitcoin.org/en/release/{{ page.redirect }}"/>
{% endif %}
<link rel="alternate" type="application/rss+xml" href="/en/rss/releases.rss" title="Bitcoin-Qt releases">
<div class="versiontext">
<h1>{{ page.title }}<br><small>{{ page.date | date:"%e %B %Y" }}</small></h1>