Detect server base URL