Set base url automatically