Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lamp-redirect

Redirects https://lamp.metamath.org/ to the Metamath-lamp application, which is currently published at https://expln.github.io/lamp/latest/index.html.

This repository exists only to hold that redirect. Metamath-lamp itself is developed at https://github.com/expln/metamath-lamp.

Why a repository instead of a DNS record

DNS maps names to addresses; it cannot express a URL path, and it cannot redirect. An HTTPS redirect has to come from a server that holds a valid certificate for lamp.metamath.org. GitHub Pages provides one automatically, so serving the redirect here means lamp.metamath.org works over HTTPS and does not depend on any other Metamath server being up.

GitHub Pages cannot issue a real HTTP 301, so the redirect is done in the page: location.replace() for browsers with JavaScript, a <meta> refresh as a fallback, and a plain link if neither runs. location.replace() is used rather than assigning to location so the redirect does not add a back-button entry.

404.html is a copy of index.html, so any path under lamp.metamath.org redirects rather than showing a GitHub 404 page.

Changing where it points

Edit the URL in index.html and 404.html. It appears four times in each file: the canonical link, the meta refresh, the location.replace() call, and the visible link. The two files are identical; keep them that way.

How it is wired up

  • DNS: lamp.metamath.org is a CNAME to metamath.github.io, managed at the metamath.org registrar.
  • CNAME in this repository claims lamp.metamath.org as the custom domain for this Pages site. Both pieces are required; the DNS record alone leaves the name unclaimed, which breaks HTTPS and invites subdomain takeover.
  • GitHub Pages is served from the default branch, root directory, with "Enforce HTTPS" enabled.

License

CC0 1.0 Universal (public domain dedication). See LICENSE.md.

SPDX-License-Identifier: CC0-1.0

About

Redirect lamp.metamath.org to Igor's page

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages