IonRouterOutlet doesn't works ... even if with a blank project

Hi, Ionic starting to drive me crazy !
I build an app, everything works perfectly ! On android, with ionic serve … but I wanted to publish it online too. It’s not the first time I did that, I never had any issues. Impossible, white page.

So, I tried to create a new clean project with the blank template. If I run ionic build, and I publish the build folder ( with a “homepage”: “build/”, in the package.json ) I have any error message and a white page.

I spend my afternoon to try to find the issue, if I change the redirect from :

<Route exact path="/" render={() => <Redirect to="/home" />} />


<Route path="/" render={() => <Redirect to="/home" />} />

Everything works. Problems, I have a lot of routes in my apps, so impossible to remove the exact.

Do you have any idea ?

1 Like

Make sure the web server where you deploy your app is configured to always serve the /index.html page no matter what the URL path is. See example server configurations.

Sadly it’s not the problem …

I’m going to try to build on another Mac …

Does it work if you serve it locally with e.g. serve?

npx serve build/

Yes. that works. But why my other application works on my server and not this one ?
I’m using apache 2.2. I add the .htacces to redirect the route to the index.html