Custom redirection and hosting 404

Need help to redirect the wrong URL for a file to correct file URL. Also, wrong URL throwing hosting 404 where we’re expecting theme 404 template.