Update 404.md
This commit is contained in:
@@ -3,21 +3,35 @@ layout: docwithnav
|
||||
title: 404 Error!
|
||||
permalink: /404.html
|
||||
---
|
||||
|
||||
<script language="JavaScript">
|
||||
$( document ).ready(function() {
|
||||
var oldURLs=[".html",".md","/v1.1/","/v1.0/","/README"];
|
||||
var doRedirect=false;
|
||||
var oldURLs=["/README.md","/README.html",".html",".md","/v1.1/","/v1.0/"];
|
||||
var fwdDirs=["examples/"];
|
||||
var doRedirect = false;
|
||||
var notHere = false;
|
||||
var forwardingURL=window.location.href;
|
||||
for (i=0;i<oldURLs.length;i++) {
|
||||
if (forwardingURL.indexOf(oldURLs[i]) > -1) {
|
||||
doRedirect=true;
|
||||
forwardingURL=forwardingURL.replace(oldURLs[i],"/");
|
||||
for (i=0;i<fwdDirs.length;i++) {
|
||||
if (forwardingURL.indexOf(fwdDirs[i]) > -1)
|
||||
{
|
||||
var urlPieces = forwardingURL.split(fwdDirs[i]);
|
||||
var newURL = "https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/" + fwdDirs[i];
|
||||
notHere = true;
|
||||
window.location.replace(newURL);
|
||||
}
|
||||
}
|
||||
if (doRedirect) {
|
||||
window.location.replace(forwardingURL);
|
||||
};
|
||||
if (!notHere) {
|
||||
for (i=0;i<oldURLs.length;i++) {
|
||||
if (forwardingURL.indexOf(oldURLs[i]) > -1)
|
||||
{
|
||||
doRedirect=true;
|
||||
forwardingURL=forwardingURL.replace(oldURLs[i],"/");
|
||||
}
|
||||
}
|
||||
if (doRedirect)
|
||||
{
|
||||
window.location.replace(forwardingURL);
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -25,4 +39,3 @@ Sorry, this page was not found. :(
|
||||
|
||||
You can let us know by filling out the "I wish this page" text field at
|
||||
the bottom of this page. Maybe try: "I wish this page _existed_."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user