8TML pages are static files, so almost any web server can host them. A few settings make the difference between a site 8-bit machines can reach and one they can’t.
Where to host
- A web hosting account or your own server: the settings on this page are all it needs.
- A computer at home: a PC, a Raspberry Pi or a NAS, for your home network or, with some router setup, for everyone. See Hosting at home.
- A C64 Ultimate: its built-in web server can serve 8TML pages to other machines on your home network. For experimenting only, never on the internet: see Hosting on a C64 Ultimate.
- T8wn: free plots for those who don’t have a server.
Plain HTTP, no forced HTTPS
Most 8-bit computers can’t do HTTPS. Serve your 8TML pages, stylesheets and form addresses over plain http://, and don’t redirect them to https://. You can still offer HTTPS next to it for modern browsers.
Content that is only available over HTTPS can be reached through an HTTPS proxy running on the reader’s own computer, but that’s extra work for every reader. Some hosting services always redirect to HTTPS and don’t let you turn it off; on those, 8-bit readers can only reach your site through such a proxy.
Content type
Send 8TML pages as text/8tml. Clients decide by the Content-Type header, not by the file name, and they refuse text/html and anything that starts with image/, audio/, video/ or font/. A missing type, text/plain or application/octet-stream also work.
Apache:
AddType text/8tml .8tml
AddType text/plain .8ss
nginx (in the http block, after include mime.types;, because a types block inside server replaces the whole list):
types {
text/8tml 8tml;
text/plain 8ss;
}
On shared web hosting, where you can’t change the server’s configuration, the Apache lines usually work in a .htaccess file in your site’s folder.
Because clients don’t look at file names, dynamic pages work too: a guestbook.php that outputs 8TML is fine as long as it sends the right type.
index.8tml and site.8ss
- A client given a folder address (one that ends in
/) asks forindex.8tmlin it by itself, so your server needs no extra index setting for 8TML. - Put the site’s stylesheet at
/site.8ss. If there is none, a normal “404 Not Found” is fine; clients remember it and don’t ask again.
The requests you’ll see
Clients send HTTP/1.0 requests with a Host: header, so name-based virtual hosting works. They follow redirects (301, 302, 303, 307), at most five in a row. Ordinary web servers handle all of this without any setting.
Web browsers on the same address
Web browsers name text/html in their Accept header; 8TML clients never do. To show browsers something else on the same address, such as an HTML version of the page or your HTTPS site, check that header: if it names text/html and not text/8tml, answer the browser; otherwise send the 8TML page. Add Vary: Accept, so caches keep the two answers apart. Don’t go by the User-Agent: there are many clients, and new ones keep coming.
Apache, sending browsers to the HTTPS home page:
RewriteEngine On
RewriteCond %{HTTP:Accept} text/html [NC]
RewriteCond %{HTTP:Accept} !text/8tml [NC]
RewriteRule \.8tml$ https://example.com/ [R=302,L]
Header always set Vary Accept "expr=%{REQUEST_URI} =~ m#\.8tml$#"
The home page itself needs no rule: for http://example.com a browser asks for /, while an 8TML client asks for /index.8tml.
Uppercase addresses
A machine in uppercase mode types addresses in uppercase, and clients send them exactly as typed: a reader may ask for /NEWS.8TML when your file is news.8tml. Name your files in lowercase, and let the server find them regardless of case. On Apache, mod_speling does it by redirecting to the right name, which clients follow:
CheckSpelling On
CheckCaseOnly On
Files
- Use 7-bit ASCII text with LF or CR LF line endings. Bytes above 127 appear as
?on the reader’s screen. - Keep pages small: a few kilobytes each. Clients cut pages that don’t fit into their memory.
How to get the files onto the server is in Publishing pages.
On T8wn
T8wn will host plots that already follow all of this.