Describe the bug
When a user changes their username, their old public DevCard URL (e.g. devcard.app/oldusername) returns a 404 instead of redirecting to the new URL. Any previously shared links or QR codes pointing to the old URL break permanently.
Steps to Reproduce
- Create a DevCard with username
alice
- Share or embed the card URL
- Change username to
alice2
- Visit the old URL — 404 error
Expected Behavior
The old username URL should 301 redirect to the new URL for at least 90 days.
Suggested Fix
Store previous usernames in a username_redirects table and add a redirect middleware that checks it before returning 404.
Describe the bug
When a user changes their username, their old public DevCard URL (e.g.
devcard.app/oldusername) returns a 404 instead of redirecting to the new URL. Any previously shared links or QR codes pointing to the old URL break permanently.Steps to Reproduce
alicealice2Expected Behavior
The old username URL should 301 redirect to the new URL for at least 90 days.
Suggested Fix
Store previous usernames in a
username_redirectstable and add a redirect middleware that checks it before returning 404.