I have used angular 12 in VSCode and Web Api 2 to develop my application.
my routing looks like this
const routes: Routes = [
{ path: '', component: HomeComponent, canActivate: [AuthGuard] },
{ path: 'home', component: HomeComponent, canActivate: [AuthGuard] },
{ path: 'login', component: LoginComponent },
.......// other routes in the application
];
@NgModule({
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
exports: [RouterModule]
})
export class AppRoutingModule { }
I have deployed my application in Dev server. The url looks something like this
https://myDomain/MyApplicationFolder/Login
Login page is rendered perfectly. All the routing works fine. my only concern is
if I type
https://myDomain/MyApplicationFolder/ I get forbidden error.
Is there anyways that i get redirected to
https://myDomain/MyApplicationFolder/home
if anyone types
https://myDomain/MyApplicationFolder/

<base href="/MyApplicationFolder">tag in index.html