Separated $redirectUrl for backend and frontend #12.