Hi,
I’ve a Ionic6/Angular app with this simple routing defined in app-routing.module.ts:
const routes: Routes = [
{
path: '',
redirectTo: 'student',
pathMatch: 'full',
},
{
path: 'student',
loadChildren: () =>
import('./pages/student/student.module').then((m) => m.StudentPageModule),
},
...
]
I’ve compiled the app with the command:
ionic build
and I’m serving the site with:
http-server .
If I visit the page of the app (https://mysite.mydomain.org) I can see the home page without problems.
But if visit the page: https://mysite.mydomain.org/student I have a not found error: GET /student" Error (404): "Not found"
Instad, if I run the app locally with “ionic serve” this fallback url works well: http://localhost:8100/student
Which could be the problem according to you?
Thank you very much
Claudio