404 when directly access URL in PWA

Hi,
i have a default login-screen for registered users:
https://.../login

For not registered Users I want to send a specific URL via email, which leads direct to the register page (so they don’t have to search for the register button).
https://.../register

The register page works fine with ionic serve but in production mode on real webspace the it’s always only a 404 error.

https://.../register/ → 404
https://.../register redirects to https://.../register/login → 404

app-routing:

    {
    path: '',
    redirectTo: 'login',
    pathMatch: 'full'
    },

Because it’s working with ionic serve the routing should be fine?
I tested to set the <base href="/"> to <base href=""> in the index.html, but it changed nothing.

Someone any ideas here?

I found similar postings, but not with working solutions:

Ok, it took some time, but I got it…

https://www.sej-ko.dk/2017/03/29/routing-single-page-application-on-apache-with-htaccess/
Pointet me to the right direction: Apache routing has to be off, for the Angular routing to manage all.
(If you run in similar problems, don’t forget to clean the cache :wink: )

Hi, can you shared the solution again in here?
i try to open the link but sadly its not valid anymore, that page have been taken down.

Try a .htaccess with

RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]