Deployment | Starting Ionic routing after

I have done an Ionic 4 app. The aim is to use it as website for mobile.
To do that I put my www folder (built thanks to the ionic build --prod --service-worker command) on a server.

I am at the stage of deploying the app in a folder on the server, which name corresponds to the app version. That way, we can check and confirm that the new version is correct and then switch to the default version.

For instance : -> goes to the new app version v0.2
But -> goes to the default app version v0.1
(thanks to ngsw-config.json I don’t have to specify the index.html file)

As you probably know, Ionic routing deleted everything after the .com and takes in the default version rather that the version specified in the URL: The built files is requested at and not at

The only article that refers more or less to my issue is :

Another solution is to separate the S3’s root folders into versions. And upload them by versions. Once uploaded you have to fix CloudFront’s distribution Origin Path to the correct version.

The solution that is suggested in this article is to add a default path, but it’s not what I want to do.
I also tried to configure navigationUrls in ngsw-config.json, unsuccessfully :frowning: .

How can I configure my project so my app’s built files redirect to the version specified in the URL and NOT the default version?
That is to say, how can I make Ionic routing start after v0.2 (

Thanks a lot for your help !

1 Like


I got the same problem concerning deployment of my app (for info, my app is hosted in a S3 bucket on AWS) !

I hope we can find someone in the @ionic_team who can help us :sunny: .


1 Like

I found the response ! Have a nice day

1 Like