--- id: TASK-51.2 title: 'Phase 1: Convert standalone domain rewrite to 301 redirects' status: To Do assignee: [] created_date: '2026-02-25 07:47' labels: - infrastructure - domains - migration dependencies: - TASK-51.1 parent_task_id: TASK-51 priority: high --- ## Description Change server/index.ts standalone domain handling from silent rewrite to 301 redirect for HTML page loads. Keep API/WS rewriting so running apps don't break. Traefik labels stay — domains must still route to the container to serve the 301. Target: server/index.ts lines 482-521. Redirect HTML page loads, continue proxying /api/* and /ws/* requests. keepStandalone domains unaffected. ## Acceptance Criteria - [ ] #1 rmaps.online/some-room returns 301 to rspace.online/demo/maps/some-room - [ ] #2 rbooks.online/ returns 301 to rspace.online/demo/books - [ ] #3 API and WebSocket requests still proxied without redirect - [ ] #4 keepStandalone domains unaffected