fix request url generating method and error page