Skip to main content

Routing

The site is served as plain static files. The server looks up a request path in this order.

Lookup order​

Take /about as an example:

  1. Exact file: is there a file named about (no extension) in the site root?
  2. .html file: is there an about.html?
  3. Directory index: is there an about/index.html? If so, the server responds with a 301 redirect to /about/. Query parameters are preserved.
  4. Fallback: return 404, or the root index.html if SPA fallback is enabled.

The home page / serves /index.html (or /index.htm) directly. A request that already ends with / (such as /about/) serves that directory's index.html without another redirect.

Examples​

RequestFiles on the siteResult
/index.html200, index.html
/aboutabout.html200, about.html
/aboutabout/index.html301 to /about/, then 200
/about/about/index.html200, about/index.html
/aboutboth about.html and about/index.html200, about.html
/docs/introdocs/intro.html200
/docs/introdocs/intro/index.html301 to /docs/intro/
/missingnone404, or the SPA fallback

When both about.html and about/index.html exist, .html wins.

Directories are never listed. Static assets such as .js, .css, images and fonts are served from their exact path.


Next: Custom 404, Site config