In this paper, we describe an algorithm to solve conditional location problems (such as the conditional p-median problem or the conditional p-center problem) on networks, where demand points are served by the closest facility whether existing or new. This algorithm requires the one-time solution of a (p + 1)-unconditional corresponding location problem using an appropriate shortest distance matrix. This algorithm can also solve other conditional location problems in which demands are served by the closest facility (new or existing) on networks.