Reputation: 53
I don't want a custom page. I just want to redirect to the index page.
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
@* go to site base *@
</NotFound>
</Router>
Upvotes: 2
Views: 3848
Reputation: 53
I finally found an answer here (under the Found and NotFound Templates section): https://chrissainty.com/introduction-to-routing-in-blazor/
Upvotes: 1