Nginx

Frontend apps

try_files $uri $uri/ /index.html;

Redirects

rewrite ^(/)(.*)$ https://other.domain/$2 redirect;