Skip to content

Commit 9a33593

Browse files
committed
🚑️ fixed routage
1 parent 0281260 commit 9a33593

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

404.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
<script>
88
(function () {
99
var full = window.location.pathname + window.location.search + window.location.hash;
10-
var base = window.location.pathname.replace(/\/[^\/]*$/, '/');
10+
var parts = window.location.pathname.split('/').filter(Boolean);
11+
var base = parts[0] === 'StreamIt' ? '/StreamIt/' : '/';
1112
var relative = full.startsWith(base) ? '/' + full.slice(base.length) : full;
1213
var target = base + 'index.html?route=' + encodeURIComponent(relative);
1314
window.location.replace(target);

0 commit comments

Comments
 (0)