fixed baseURL problem when no index.html is in the URL