Better URL parsing for server