can get BASE from env
fix some redirects