← back to 1890swallpaper
feat: clean-URL routes for nav pages, fixes /about 404
338c505cf6f486544f7b7d6b9b64493eaf28cbaa · 2026-05-19 08:21:26 -0700 · SteveStudio2
The /about nav link (header + footer) had no target page or route.
Added extension-less routes for /care /history /sourcing /trade and
pointed /about at the existing history.html brand page.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit 338c505cf6f486544f7b7d6b9b64493eaf28cbaa
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date: Tue May 19 08:21:26 2026 -0700
feat: clean-URL routes for nav pages, fixes /about 404
The /about nav link (header + footer) had no target page or route.
Added extension-less routes for /care /history /sourcing /trade and
pointed /about at the existing history.html brand page.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
server.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/server.js b/server.js
index 9a281b8..5124c5f 100644
--- a/server.js
+++ b/server.js
@@ -146,6 +146,18 @@ app.use((req, res, next) => {
app.use(express.static(path.join(__dirname, 'public')));
+// Clean-URL routes for extension-less nav links → existing public/*.html pages.
+const CLEAN_URLS = {
+ '/care': 'care.html',
+ '/history': 'history.html',
+ '/sourcing': 'sourcing.html',
+ '/trade': 'trade.html',
+ '/about': 'history.html', // brand "About" page is the short-history page
+};
+for (const [route, file] of Object.entries(CLEAN_URLS)) {
+ app.get(route, (req, res) => res.sendFile(path.join(__dirname, 'public', file)));
+}
+
app.get('/api/products', (req, res) => {
const { q, aesthetic, vendor, page = 1, limit = 24, sort = 'newest'} = req.query;
let list = PRODUCTS_NICHE;
← b5d0ee4 chore: untrack snapshot files, ignore *.bak/*.pre-*, 404-gua
·
back to 1890swallpaper
·
chore: add noreferrer to external target=_blank Facebook lin d707d9c →