Angular - The requested URL /home was not found on this server

In case you are deploying on Apache , you should enable the mod_rewrite module :

sudo a2enmod rewrite

Then Restart Apache , sudo systemctl restart apache2

After that do the suggested changes in the .htaccess as per the previous answer


FIXED: (for Apache HTTP server)

i created .htaccess file and put it into root folder on a provider side.

.htaccess

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

The matter is in your HTTP server configuration.

you have to make all the URL after your hostname pointing to the HTML resource embedding your angular application.

like in NGINX :

 location / {
       root <path to index.html>;
       try_files $uri  /index.html =404;
( if ressource exist serves it, likes images, else load index.html to load angular app )
    }

here is the official documentation

while navigating after initial load, the angular router take the lead, and display data after location change dynamically without http request.

But if you load directly to <...>/home the http server certainly try to load a file home.html, and then send a 404.