Ship Cache-Control, 301 redirects, custom 404/500, sitemap/robots, and init unique/index so the web capability roadmap is complete for P0–P2. Co-authored-by: Cursor <cursoragent@cursor.com>
805 B
805 B
title: web W7 live server — 404, redirect, sitemap, robots, cache-control import web:ext/web/web.mq.md import plugin:lib/plugin.mq.md import sys:lib/sys.mq.md
main
p = > plugin.native_path name="web"
p
plugin.load path=
p
sys.exit code=1
items =
| loc | note |
|---|---|
| / | home |
| /about | about |
pg = > web.page title="w7-live"
nf = > web.page title="Not Found Page"
app = > web.app page=pg port=18121
app = > app.configure cache_control="public, max-age=120"
app = > app.redirect from="/legacy" to="/" permanent=True
app = > app.error_page status=404 page=nf
app = > app.sitemap path="/sitemap.xml" base="http://127.0.0.1:18121" items=items
app = > app.robots sitemap="http://127.0.0.1:18121/sitemap.xml"
app.listen