I have a _redirects file with the following rule:
/api1/* http://example.com:9000/api/:splat 200! /api2/* https://example.com:90001/api/:splat 200!
/api1/* works fine and rewrites properly to the backend api where /api2/* always give me 500 error and it is not hitting the backend.
Do we need to do anything specific while rewriting urls to https with port other than 443?