File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,10 @@ const REDIRECTS = [
6666
6767 // dlt+ redirect
6868 {
69- from : "/docs/plus/ " ,
70- to : "/docs/hub/"
69+ from : "/docs/hub " ,
70+ to : "/docs/hub/intro "
7171 } ,
72+
7273]
7374
7475const ROUTE_404 = "/docs/404" ;
@@ -78,11 +79,17 @@ const handler = {
7879
7980 const url = new URL ( request . url ) ;
8081
82+ // forward plus requests to hub
83+ if ( url . pathname . includes ( "/plus" ) ) {
84+ url . pathname = url . pathname . replace ( "/plus" , "/hub" ) ;
85+ return Response . redirect ( url . toString ( ) , 301 ) ;
86+ }
87+
8188 // handle redirects
8289 for ( const redirect of REDIRECTS ) {
8390 if ( url . pathname === redirect . from ) {
8491 url . pathname = redirect . to ;
85- return Response . redirect ( url . toString ( ) , redirect . code || 301 ) ;
92+ return Response . redirect ( url . toString ( ) , 301 ) ;
8693 }
8794 }
8895
You can’t perform that action at this time.
0 commit comments