Change way how redirects from /api/ folder works

Change way how redirects from /api/ folder works to prevent conflicts with API sub-domain