[ocaml-infra] Looking for a new home for the ocamlunix book

Richard Mortier mort at cantab.net
Tue Oct 28 14:05:50 GMT 2014


On 28 October 2014 12:23, Amir Chaudhry <amc79 at cam.ac.uk> wrote:
>
> The above implies the need for a full blown Jekyll site.
> I think it might be simpler to have a single html page with a redirect (as below).
> My understanding is that we'd need a repo called ocaml.github.io with a single index.html file
> It's not a 301 (permanent) redirect but not many people should be hitting that page anyway.
>
> <meta http-equiv="Refresh" content="0; url=http://ocaml.org">
>
> (I'm guessing at the above and some may consider it bad practice)

i think it's usual to have a skeleton page as well that displays
suitable text and link that the user can do the redirect by hand for
whatever reason.

cf. what google does if (eg) you access google.com from within uk:

```
$ telnet google.com 80
Trying 173.194.112.228...
Connected to google.com.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.0 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.de/?gfe_rd=cr&ei=tJ9PVNWBEYOI8QfyqYDoCw
Content-Length: 258
Date: Tue, 28 Oct 2014 13:52:52 GMT
Server: GFE/2.0
Alternate-Protocol: 80:quic,p=0.01

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.de/?gfe_rd=cr&ei=tJ9PVNWBEYOI8QfyqYDoCw">here</A>.
</BODY></HTML>
Connection closed by foreign host.
```

(in this case, i'm in germany so the redirect is to google.de.  if we
can't control headers returned to give a 302 with a Location: header,
then the meta tag is it i think-- but returning some kind of page is
still a good idea.)

-- 
Richard Mortier
mort at cantab.net


More information about the Infrastructure mailing list