properly define $base_url