I am working on making urls like example.com/profile/username to work where example.com runs Wordpress(latest release). The install is on root. I wrote a plugin hook to catch template_redirect and I examine the URL to see if it is a profile request and then I show the profile.
But, when a URL that does not exist is typed, Wordpress does an auto search for related posts before triggering a 404 or template redirect.
For example, example.com/profile/foobar goes to another page which has foobar in its title like example.com/2009/10/1/foobar
How do I stop this from happening?