TL;DR: replace http
with https
, such that e.g. http://web.archive.org/web/20210617234942/https://www.uowmkdu.edu.my/study-at-uow-kdu/transportation/
becomes https://web.archive.org/web/20210617234942/https://www.uowmkdu.edu.my/study-at-uow-kdu/transportation/
.
Journey
Since I've just recently enrolled myself into a diploma programme for UOW Malaysia KDU (hereby referred to as KDU for the rest of the document), and since I'm living outside the campus, I need to rely on the university shuttle to go back and forth.
Out of curiosity, I decided to look at the historical snapshots of the transportation webpage on Wayback Machine, but all of the snapshots redirected me back to the original URL rendering me unable to access them at all, so I opened up the web developer tools > debugger to run the webpage step-by-step to see which script caused it.
I ended up finding out this:
<script>if (document.location.protocol != "https:") {document.location = document.URL.replace(/^http:/i, "https:");}</script><script type="text/javascript" src="http://web.archive.org/web/20210617234942js_/https://www.uowmkdu.edu.my/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp"></script>
This single-line JavaScript, in layman's terms, essentially redirects the user from the non-secure HTTP protocol to HTTPS protocol by literally replacing the web browser's URL. This redirection should have been done on the web server configuration level with relevant HTTP status codes.
Seeing as it's already fully archived by Archive.org, which means there's no way for us to edit it on the browser level, I decided to try writing a Greasemonkey script, but the first draft ended up not working.
Reading back the original script again, I then remembered that it only runs when the protocol isn't https
, and that Archive.org by default doesn't redirect you to HTTPS if you just type in the URL, so instead I changed the protocool to https
and I'm suddenly able to access the snapshots.
I don't necessarily have to type all of this out, but I hope this serves as a reminder, both to myself and anyone else who somehow comes across this, that at least with IT you should always, ALWAYS, keep Occam's razor in your mind.
Essentially, try the simplest (potential) solutions first before moving onto more complicated solutions.
In case anyone's interested, I have included the first draft of the Greasemonkey script I have written.