Plesk - Angular 8 Hosting

219 Views Asked by At

"404 Not Found" on all pages except start page."

First page only working. Remaining pages all 404 error

If I run below structure url is working. https://abcd.xyz

If I run below structure url is not working https://abcd.xyz/login

2

There are 2 best solutions below

1
Sanjay Idpuganti On BEST ANSWER

Try useHash property in RouterModule

1
Osama On

It's a bit late but if you're hosting your website on Linux you need to create a ".htaccess" file and paste inside it the following:

      <IfModule mod_rewrite.c>  
           RewriteEngine On             
           RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
           RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d    
           RewriteRule ^.*$ - [NC,L]
           RewriteRule ^(.*) index.html [NC,L]
       </IfModule>