url detection for baseUrl