tdwg.github.io

Redirects URLs when repositories have been renamed or moved.

Problem

While GitHub will automatically redirect renamed repositories, it will not redirect GitHub Pages URLs:

✅ https://github.com/tdwg/old_name to https://github.com/tdwg/new_name
🚫 https://tdwg.github.io/old_name to https://tdwg.github.io/new_name

Solution

This repository has an organization-level https://tdwg.github.io GitHub Pages website. By adding a specific directory to the repository, when can redirect URLs:

  1. Go to https://github.com/tdwg/tdwg.github.io
  2. Add a directory with the name of the old repository (old_name)
  3. Add an index.html file
  4. Give it the following content, where new_url is the URL of the destination:
     <html>
       <head>
         <meta http-equiv="refresh" content="0;URL=new_url">
       </head>
     </html>
    
  5. Commit

https://tdwg.github.io/old_name/ will now continue to exist, even though the tdwg/old_name repository does not. And it will redirect to the new URL.