Skip to content

Commit

Permalink
rackspace directly for https
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Nov 15, 2024
1 parent c79ca1b commit 32a8cc6
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions _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,10 +17,18 @@
}

if(url.startsWith("pub/")){
window.location.assign("http://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"){
window.location.assign("http://pub.fenicsproject.org/")
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))
Expand Down

0 comments on commit 32a8cc6

Please sign in to comment.