I have tried this answer and can confirm that mod_rewrite is enabled on my hosting
And I have tried the following .htaccess configurations from various answers and sites but none helped.I'm not able to debug where the problem is.
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
From some gist
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
And many others but all are giving 404 errors. Any way to debug it.
I'm using ng build --prod
to make a dist then hosting on dev.example.com
and trying to access dev.example.com/home
which is available when accessed from dev.example.com
Could it be due to sub domain?