← back to Greenwallcoverings
add: clean-URL routes /history /care /sourcing /trade /vocabulary
45090d9612f0713c684b54629ef9db02483693ce · 2026-05-25 21:07:06 -0700 · Steve
Files touched
Diff
commit 45090d9612f0713c684b54629ef9db02483693ce
Author: Steve <steve@designerwallcoverings.com>
Date: Mon May 25 21:07:06 2026 -0700
add: clean-URL routes /history /care /sourcing /trade /vocabulary
---
server.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/server.js b/server.js
index 13b7736..5aa6613 100644
--- a/server.js
+++ b/server.js
@@ -218,6 +218,13 @@ app.get('/sample/:handle', (req, res) => {
// /about → served by the "short history" page (no dedicated about.html exists)
app.get('/about', (req, res) => res.sendFile(path.join(__dirname, 'public', 'history.html')));
+// Clean-URL routes for extension-less nav (/history, /care, /sourcing, /trade,
+// /vocabulary). Each maps to its public/<page>.html sibling so links can drop
+// the .html suffix without 404ing.
+for (const slug of ['history', 'care', 'sourcing', 'trade', 'vocabulary']) {
+ app.get('/' + slug, (req, res) => res.sendFile(path.join(__dirname, 'public', slug + '.html')));
+}
+
// sitemap.xml + robots.txt for SEO
app.get('/robots.txt', (req, res) => {
res.type('text/plain').send(`User-agent: *
← e625c42 redact: rail card meta — replace p.vendor with 'Designer Wal
·
back to Greenwallcoverings
·
add: 404-guard middleware blocks .bak/.pre-* requests (defen 7b8c1f0 →