What is the first php file wordpress goes to to determine what page, document or URL to load. I have some PHP I want executed to determine what happens when certain URL's are entered. At the moment it's in the 404.php for want of a better place.
This however is not ideal. The index.php in theme is not referenced so what is?