add base url check logic.