[object Object]

← back to Restaurantwallpaper

add clean-URL routes for /about /history /care /trade /sourcing

37fcdc50ddde227b2a374ff83c945c232ff1faf1 · 2026-05-19 07:57:31 -0700 · Steve Abrams

/about previously 404'd (no about.html) — now maps to history.html, the
site's about-style page. Also exposes clean URLs for the existing care/
trade/sourcing content pages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 37fcdc50ddde227b2a374ff83c945c232ff1faf1
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue May 19 07:57:31 2026 -0700

    add clean-URL routes for /about /history /care /trade /sourcing
    
    /about previously 404'd (no about.html) — now maps to history.html, the
    site's about-style page. Also exposes clean URLs for the existing care/
    trade/sourcing content pages.
    
    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 a6358ed..098c9bc 100644
--- a/server.js
+++ b/server.js
@@ -144,6 +144,18 @@ app.use((req, res, next) => {
   next();
 });
 
+// Clean-URL routes for extension-less nav links → existing HTML pages.
+const CLEAN_URLS = {
+  '/about':    'history.html',
+  '/history':  'history.html',
+  '/care':     'care.html',
+  '/trade':    'trade.html',
+  '/sourcing': 'sourcing.html',
+};
+for (const [route, file] of Object.entries(CLEAN_URLS)) {
+  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) => {

← 0d07abf facets total counts niche list; untrack .bak/.pre- snapshots  ·  back to Restaurantwallpaper  ·  add noreferrer to Facebook external link (had noopener only) 8f1eeed →