I am trying to design a small site where most of (95%) of site assets will be passed through home sort of PHP script, and the remaining 5% are being hosted from a subdomain (background images, logos, etc. What I would like is that whenever a page is called, say www.example.com/blog/My_trip_to_the_andes
the page that would be called is
htdocs/nexus.php
and that script would be able to discover what URI was requested. From that URI the script will determine what the user is asking for and generate it. As the redirects happen the headers need to be maintained, so the script receives any POST data or COOKIE data.
I believe that I can accomplish this with an .htaccess in the site root directory. But I have little to no experience with .htaccess and the documentation doesn't seem to speak to this.
Is this even a good idea? I want every page request to go through a script so I can log, do some 404 tracking and redirects, gate keep cross site requests for resources, and stuff I can't even think about yet.