|
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | | -<title>Retune Invite</title> |
7 | | - |
8 | | -<!-- Open Graph meta tags for invite links - important for social media previews --> |
9 | | -<meta property="og:title" content="Join me on Retune" /> |
10 | | -<meta property="og:description" content="Discover new music and explore what people are listening to around you." /> |
11 | | -<meta property="og:image" content="https://raw.githubusercontent.com/ucladevx/retune-website/2025-update/assets/images/retune_icon.png" /> |
12 | | -<meta property="og:url" content="https://retuneapp.com/invite" /> |
13 | | -<meta property="og:type" content="website" /> |
14 | | - |
15 | | -<!-- Universal Links / App Links --> |
16 | | -<link rel="apple-app-site-association" href="/.well-known/apple-app-site-association"> |
17 | | -<meta name="apple-itunes-app" content="app-id=6741438431"> |
18 | | - |
| 6 | +<title>Page Not Found - Retune</title> |
19 | 7 | <script> |
20 | | - // Immediate redirect - execute immediately |
| 8 | + // Don't interfere with .well-known files |
21 | 9 | (function() { |
22 | 10 | var path = window.location.pathname; |
23 | | - |
24 | | - // Don't interfere with .well-known files |
25 | 11 | if (path.indexOf('/.well-known/') === 0) { |
26 | | - return; |
27 | | - } |
28 | | - |
29 | | - // Handle /invite/{code} - redirect to query parameter format |
30 | | - var inviteMatch = path.match(/\/invite\/([^\/]+)/); |
31 | | - if (inviteMatch && inviteMatch[1]) { |
32 | | - var code = encodeURIComponent(inviteMatch[1]); |
33 | | - window.location.replace('/invite?code=' + code); |
34 | | - return; |
35 | | - } |
36 | | - |
37 | | - // Handle /invite (without code in path) - load invite page directly |
38 | | - if (path === '/invite' || path === '/invite/') { |
39 | | - // If we're here, GitHub Pages isn't serving /invite/index.html correctly |
40 | | - // Load the invite page content directly |
41 | | - fetch('/invite/index.html') |
42 | | - .then(function(response) { |
43 | | - if (!response.ok) throw new Error('Failed to load'); |
44 | | - return response.text(); |
45 | | - }) |
46 | | - .then(function(html) { |
47 | | - var parser = new DOMParser(); |
48 | | - var doc = parser.parseFromString(html, 'text/html'); |
49 | | - |
50 | | - // Replace head content |
51 | | - Array.from(doc.head.children).forEach(function(child) { |
52 | | - if (child.tagName !== 'TITLE') { |
53 | | - document.head.appendChild(child.cloneNode(true)); |
54 | | - } |
55 | | - }); |
56 | | - |
57 | | - // Replace body content |
58 | | - document.body.innerHTML = doc.body.innerHTML; |
59 | | - |
60 | | - // Execute scripts |
61 | | - var scripts = doc.querySelectorAll('script'); |
62 | | - scripts.forEach(function(oldScript) { |
63 | | - var newScript = document.createElement('script'); |
64 | | - if (oldScript.src) { |
65 | | - newScript.src = oldScript.src; |
66 | | - } else { |
67 | | - newScript.textContent = oldScript.textContent; |
68 | | - } |
69 | | - document.body.appendChild(newScript); |
70 | | - }); |
71 | | - }) |
72 | | - .catch(function() { |
73 | | - // Fallback: try redirecting with trailing slash |
74 | | - if (path === '/invite') { |
75 | | - window.location.replace('/invite/' + window.location.search); |
76 | | - } |
77 | | - }); |
78 | | - return; |
| 12 | + return; // Let GitHub Pages serve the file |
79 | 13 | } |
80 | | - |
81 | | - // For other 404s, redirect to home |
82 | | - window.location.replace('/'); |
| 14 | + // Everything else is a 404 - show page not found |
83 | 15 | })(); |
84 | 16 | </script> |
85 | 17 | </head> |
86 | | -<body> |
87 | | - <div style="display:flex; justify-content:center; align-items:center; height:100vh; font-family:sans-serif; text-align:center;"> |
88 | | - <p>Redirecting...</p> |
| 18 | +<body style="display:flex; justify-content:center; align-items:center; height:100vh; font-family:sans-serif; text-align:center;"> |
| 19 | + <div> |
| 20 | + <h1>404 - Page Not Found</h1> |
| 21 | + <p>The page you're looking for doesn't exist.</p> |
| 22 | + <p><a href="/" style="color: #ff6600;">Return to home</a></p> |
89 | 23 | </div> |
90 | 24 | </body> |
91 | 25 | </html> |
|
0 commit comments