You should rewrite the URL rules.For every server rules will be diifferent and you can try this for IIS.
=> Create web.config in src folder and copy below code.
=> add web.config path to angular-cli.json file:
"assets": [
"assets",
"favicon.ico",
"web.config"
],
=> Let’s build: ng build --prod