-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path404.html
More file actions
28 lines (28 loc) · 1.11 KB
/
404.html
File metadata and controls
28 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Redirecting...</title>
<script>
// SPA redirect for GitHub Pages: move path into query so index.html can restore it
(function () {
var l = window.location;
// derive base path like /owner/repo or /repo depending on hosting
var parts = l.pathname.split('/').filter(Boolean);
// assume repo is the first path segment when hosted on browserstack.github.io
var repoIndex = parts.indexOf('test-selection-demo-app-browserstack');
var base = '/test-selection-demo-app-browserstack/';
// If repo not found, fall back to root
if (repoIndex === -1) {
base = '/';
}
var newPath = base + '?/' + l.pathname.slice(base.length).replace(/&/g, '~and~') + (l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') + l.hash;
l.replace(l.protocol + '//' + l.host + newPath);
})();
</script>
</head>
<body>
<p>Redirecting to the app...</p>
</body>
</html>