added rewrite to /api/