Skip to content

Commit

Permalink
update redirect (#196)
Browse files Browse the repository at this point in the history
* update redirect

* rackspace directly for https
  • Loading branch information
mscroggs authored Nov 15, 2024
1 parent b0ffb77 commit f54659a
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion _includes/_404_redirect.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<script type='text/javascript'>
var url = document.location.href
var s = false

if(url.startsWith("https://")){
url = url.substring(8)
s = true
} else if(url.startsWith("http://")){
url = url.substring(7)
s = false
}
if(url.startsWith("www.")){
url = url.substring(4)
Expand All @@ -14,9 +17,23 @@
}

if(url.startsWith("pub/")){
window.location.assign("https://pub.fenicsproject.org/" + url.substring(4))
if(s){
window.location.assign("https://a654cc05c43271a5d22f-f8befe5e0dcd44ae0dccf352c00b4664.ssl.cf5.rackcdn.com/" + url.substring(4))
} else {
window.location.assign("http://pub.fenicsproject.org/" + url.substring(4))
}
}
if(url == "pub"){
if(s){
window.location.assign("https://a654cc05c43271a5d22f-f8befe5e0dcd44ae0dccf352c00b4664.ssl.cf5.rackcdn.com/")
} else {
window.location.assign("http://pub.fenicsproject.org/")
}
}
if(url.startsWith("olddocs/")){
window.location.assign("https://olddocs.fenicsproject.org/" + url.substring(8))
}
if(url == "olddocs"){
window.location.assign("https://olddocs.fenicsproject.org/")
}
</script>

0 comments on commit f54659a

Please sign in to comment.