← back to Hotelwallcoverings
add clean-URL routes for /care /history /sourcing /trade /vocabulary nav links
b0ef9675d0824c5928fd3fe010b057034ee3c0e9 · 2026-05-25 21:16:23 -0700 · Steve Abrams
Files touched
Diff
commit b0ef9675d0824c5928fd3fe010b057034ee3c0e9
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon May 25 21:16:23 2026 -0700
add clean-URL routes for /care /history /sourcing /trade /vocabulary nav links
---
server.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/server.js b/server.js
index 591d892..88b38d6 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 — nav links across the site point to /care, /history,
+// /sourcing, /trade, /vocabulary (no `.html`); map each to the matching file
+// in public/ so they stop 404'ing.
+['care','history','sourcing','trade','vocabulary'].forEach(slug => {
+ 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: *
← d292928 /api/facets: count from filtered list (q/aesthetic/vendor),
·
back to Hotelwallcoverings
·
add rel=noopener noreferrer to Facebook target=_blank link 5d2389b →