Hey guys, I am facing an issue with deeplinks (Angular router). They work perfectly when I run ionic serve
. However, when I run ionic build
and then serve the www folder with either nginx on my vps, or with the serve npm module in local, deeplinks dont work. Indeed, if i try to reach /mypage manually it throws 404 error.
Do you guys have any idea why this is not working ?
EDIT: solved thanks to mhatington’s answer. For those who wonder how to do that on nginx, I added this line :
try_files $uri $uri/ /index.html;