← back to Designtradelive
clean-URL routes: /about + /contact -> /#about anchor
acd885d02bc6ebf21ea22accc1d0f3231c54aedd · 2026-05-19 21:14:44 -0700 · Steve Abrams
The hamburger nav links to /about but no /about page exists, so the link
was 404ing. The footer already carries the about copy as an anchor
(#about), so add a 301 redirect /about -> /#about and the same for
/contact (which the footer also exposes via mailto), so every nav link
lands somewhere real.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit acd885d02bc6ebf21ea22accc1d0f3231c54aedd
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue May 19 21:14:44 2026 -0700
clean-URL routes: /about + /contact -> /#about anchor
The hamburger nav links to /about but no /about page exists, so the link
was 404ing. The footer already carries the about copy as an anchor
(#about), so add a 301 redirect /about -> /#about and the same for
/contact (which the footer also exposes via mailto), so every nav link
lands somewhere real.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
server.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/server.js b/server.js
index 8c3ef49..98d7804 100644
--- a/server.js
+++ b/server.js
@@ -108,6 +108,13 @@ app.get('/api/events', (req, res) => {
app.get('/healthz', (req, res) => res.json({ ok: true, count: EVENTS.length }));
+// Clean-URL aliases for nav links that don't have dedicated pages yet.
+// The footer carries the about copy as an anchor (#about); the hamburger
+// menu links to /about. Redirect /about to the footer anchor so the link
+// never 404s.
+app.get('/about', (req, res) => res.redirect(301, '/#about'));
+app.get('/contact', (req, res) => res.redirect(301, '/#about'));
+
app.use((req, res) => res.status(404).render('404', { GA_ID, SITE_NAME, DOMAIN }));
app.listen(PORT, '127.0.0.1', () => {
← e7feded harden static layer: ignore + 404-guard editor/refactor snap
·
back to Designtradelive
·
Add per-site favicon (kills /favicon.ico 404) 619918b →