IIS7 web.config custom error page?
I'm used to working on a Apache2 server where I could use htaccess to set up things such as custom error pages and am trying to apply the same practice with a web.config file on IIS7.
I think the problem is my lack of understanding of IIS7 setup in general. I have a server set up using php5 and everything is working fine. When on apache dev server I would have something like www.mydomain.com/testsites/site1 and then site2, site3... and so on. And I would just drop a htaccess file in the root of the site in question.
The "default site" in IIS7 is what complicates things for me. I have gone and dropped all my test sites into the root of www which is accessed by the default site however even if I set custome error pages up in "site1" through IIS manager I still get the IIS7 error pages. Do I have to use the manager and create a different site bound to a different port for every test site or can I just put everything in the www directory this way?
I've found many articles through google but the terminology is beyond my current comprehension as all the solutions revolve around asp.net, dotnet3.5, asp, aspx, etc.
So I'm wondering can someone tell me as if I was totally new, what, where, and how, do I need to do/change besides putting my web.config file in the root of site1 to keep IIS7 from overriding the custom errors setup I have in my web.config.
Thanks to anyone who doesnt' mind taking the time to walk me through this in steps.
By the way, I got this from one of the articles and modified it to the actual path of my error page and then put it in the root of site1 with the "error_pages" directory.
<customErrors mode="On" defaultRedirect="/error_pages/404_page_not_found.html">
<error statusCode="404" redirect="/error_pages/404_page_not_found.html"/>