File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 22< html lang ="en ">
33 < head >
44 < title > ngx lib - Not Found - Redirecting</ title >
5- < meta http-equiv ="refresh " content ="0; URL='./index.html ' " />
5+ < meta http-equiv ="refresh " content ="0; URL='/ngx-lib/ ' " />
66 < script type ="text/javascript ">
7- console . log ( window . location . pathname ) ;
8- window . location . href = "./index.html" + window . location . pathname ;
7+ // Check if the current path isn't the root ("/ngx-lib/")
8+ if ( window . location . pathname !== "/ngx-lib/" ) {
9+ alert ( window . location . pathname ) ;
10+ // Redirect the user back to the index page while preserving the original route
11+ window . location . replace (
12+ "/ngx-lib/" + window . location . pathname . substring ( 1 ) ,
13+ ) ;
14+ }
915 </ script >
1016 </ head >
1117 < body > </ body >
You can’t perform that action at this time.
0 commit comments