This repository has been archived by the owner on May 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Carlos Rueda edited this page Feb 23, 2017
·
17 revisions
For any bookmarks out there,
https?://mmisw.org/orr/
should redirect to new dispatch at https?://mmisw.org/ont/
once v3 is installed at /ont/
.
For this, a new index.html
will be deployed at the /orr/
path to take care of the redirection according to the routes supported in v2 and corresponding appropriate handling in v3.
Tests to verify the expected redirection behavior:
orr/index.html
:
<!DOCTYPE html>
<html>
<head>
<script>
var hash = (window.location.hash || '').trim();
console.debug("hash=[" +hash+ "]");
var targetBase = '/ont_tmp3/';
var location;
if (!hash || hash === '#'
|| hash === '#admin'
|| hash === '#b'
|| hash === '#bu'
|| hash === '#ba'
|| hash === '#ua'
|| hash === '#login'
|| hash === '#logout'
|| hash === '#voc2rdf'
|| hash === '#vine'
) {
location = targetBase;
}
else if (hash.startsWith('#so')) {
location = targetBase + '#/so' + hash.substring(3);
}
else if (hash.startsWith('#st')) {
location = targetBase + '#/st' + hash.substring(3);
}
else if (hash === '#rx') {
location = targetBase + '#/rx';
}
else if (hash === '#__test') {
// do not redirect.
}
else if (hash.startsWith('#')) {
location = targetBase + '?uri=' + hash.substring(1);
}
else {
location = targetBase + '?uri=' + hash;
}
window.location = location;
</script>
</head>
<body>
</body>
</html>