URL handling improvements