I am facing issue, 404 page not found. after the use HashLocationStrategy, .htaccess, webcong but issue still appearing. The mentioned process not working
Using software
app.module.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>
You need to use mod_rewrite. Good way to put it is in .htaccess. However, to get more help you need to improve your question... a lot!