If your content is dynamically generated, then you need to search the content it is generated by. If it's static, then you probably still want to put it in a DB, that's waht databases are good at. It sounds to me like your issue is taking the content you find, and correctly linking to the page that was found. I am not sure why this is, but it indicates an issue in your data structure. the cheats way, nowadays, is to use google to search your site.
Christian Graus Driven to the arms of OSX by Vista.