← back to Handcraftedwallpaper
add clean-URL routes for about/history/care/sourcing/trade — fixes dead /about nav link
2e99863244e9d44c258a0e28ae7c6436fc38b984 · 2026-05-18 20:50:38 -0700 · Steve Abrams
Files touched
Diff
commit 2e99863244e9d44c258a0e28ae7c6436fc38b984
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon May 18 20:50:38 2026 -0700
add clean-URL routes for about/history/care/sourcing/trade — fixes dead /about nav link
---
server.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/server.js b/server.js
index a7fd0e2..a63fb7d 100644
--- a/server.js
+++ b/server.js
@@ -134,6 +134,12 @@ app.use(express.json({ limit: "256kb" }));
const cfg = require('../_shared/site-config').load(__dirname);
require("./_universal-contact")(app, cfg.contact);
require("./_universal-auth")(app, cfg.auth);
+// Clean-URL routes for the static info pages (also fixes the dead /about nav link).
+const PAGE_ROUTES = { '/about': 'history.html', '/history': 'history.html', '/care': 'care.html', '/sourcing': 'sourcing.html', '/trade': 'trade.html' };
+for (const [route, file] of Object.entries(PAGE_ROUTES)) {
+ app.get(route, (req, res) => res.sendFile(path.join(__dirname, 'public', file)));
+}
+
app.use(express.static(path.join(__dirname, 'public')));
app.get('/api/products', (req, res) => {
← cc0c4d0 fix /api/facets total — report niche-filtered product count,
·
back to Handcraftedwallpaper
·
untrack 18 stale .bak/.pre snapshot files and gitignore the bcffd21 →