Estoy enfrentando un problema, no se encontró la página 404. después de usar HashLocationStrategy, .htaccess, webcong pero el problema sigue apareciendo. El proceso mencionado no funciona.
uso de software
aplicación.módulo.ts
import { HashLocationStrategy, LocationStrategy } from "@angular/common"; { provide: LocationStrategy, useClass: HashLocationStrategy }.htaccess
<IfModule mod_rewrite.c> RewriteEngine on # Don't rewrite files or directories RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] # Rewrite everything else to index.html # to allow html5 state links RewriteRule ^ index.html [L] </IfModule>web.config
<configuration> <system.webServer> <rewrite> <rules> <rule name="Angular Routes" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="/" /> </rule> </rules> </rewrite> </system.webServer> </configuration>Necesitas usar mod_rewrite . Una buena manera de ponerlo es en .htaccess . Sin embargo, para obtener más ayuda, necesita mejorar su pregunta ... ¡mucho!