With the flurry of research on P2P computing, many P2P technical challenges have emerged, one of which is how to efficiently locate desired resources. Advances have been made in this hot research field, where the pioneers are Pastry, CAN, Chord, and Tapestry. By using the functionality of distributed hash table, they have achieved fair effectiveness. However, they have many common limitations, such as ignoring the autonomous nature of peers, and just supporting weakly semantic functions. In this paper, according to the reality in the distributed network, we propose a content-based location mechanism, which not only keep the autonomy of peers, but also support approximate query and finer granularity of content sharing. Furthermore, this mechanism also facilitates P2P system to evolve dynamically. We have also used PeerIS, a P2P based information system used to verify it and obtained satisfactory results.