@@ -3,26 +3,39 @@ layout: docwithnav
3
3
title : 404 Error!
4
4
permalink : /404.html
5
5
---
6
-
7
6
<script language =" JavaScript " >
8
7
$ ( document ).ready (function () {
9
- var oldURLs= [" .html" ," .md" ," /v1.1/" ," /v1.0/" ," /README" ];
10
- var doRedirect= false ;
8
+ var oldURLs= [" /README.md" ," /README.html" ," .html" ," .md" ," /v1.1/" ," /v1.0/" ];
9
+ var fwdDirs= [" examples/" ];
10
+ var doRedirect = false ;
11
+ var notHere = false ;
11
12
var forwardingURL= window .location .href ;
12
- for (i= 0 ;i< oldURLs .length ;i++ ) {
13
- if (forwardingURL .indexOf (oldURLs[i]) > - 1 ) {
14
- doRedirect= true ;
15
- forwardingURL= forwardingURL .replace (oldURLs[i]," /" );
13
+ for (i= 0 ;i< fwdDirs .length ;i++ ) {
14
+ if (forwardingURL .indexOf (fwdDirs[i]) > - 1 )
15
+ {
16
+ var urlPieces = forwardingURL .split (fwdDirs[i]);
17
+ var newURL = " https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/" + fwdDirs[i];
18
+ notHere = true ;
19
+ window .location .replace (newURL);
20
+ }
21
+ }
22
+ if (! notHere) {
23
+ for (i= 0 ;i< oldURLs .length ;i++ ) {
24
+ if (forwardingURL .indexOf (oldURLs[i]) > - 1 )
25
+ {
26
+ doRedirect= true ;
27
+ forwardingURL= forwardingURL .replace (oldURLs[i]," /" );
28
+ }
16
29
}
30
+ if (doRedirect)
31
+ {
32
+ window .location .replace (forwardingURL);
33
+ };
17
34
}
18
- if (doRedirect) {
19
- window .location .replace (forwardingURL);
20
- };
21
35
});
22
36
</script >
23
37
24
38
Sorry, this page was not found. :(
25
39
26
40
You can let us know by filling out the "I wish this page" text field at
27
41
the bottom of this page. Maybe try: "I wish this page _ existed_ ."
28
-
0 commit comments