dev model router is working;
but not working in dist directory with nginx server;
ex:
dev model:
locahost:4200/login working
prod model:
www.xxx.xx/login not working (dist directory)
angular-cli: 1.0.0-beta.18
node: 4.6.1
os: win32 x64
Hi,
If you use "apache server" to execute your prod env. You need to add rewrite rule into your htaccess like this
<IfModule mod_rewrite.c>
Options Indexes FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
As mentioned, this is not related to the CLI. A quick search on SO lead to this question:
http://stackoverflow.com/questions/7027636/nginx-send-all-requests-to-a-single-html-page
@clydin thank you! you provide the link solve my question!
location / { try_files $uri /base.html; }
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
As mentioned, this is not related to the CLI. A quick search on SO lead to this question:
http://stackoverflow.com/questions/7027636/nginx-send-all-requests-to-a-single-html-page