g1smd - 4:23 pm on Nov 2, 2012 (gmt 0) [edited by: g1smd at 4:26 pm (utc) on Nov 2, 2012]
We've discussed the many deficiencies in that "standard issue" Wordpress code many times before, the last being only a few weeks ago. Do not use that code in its present form.
There is no reason why page URLs have to end .htm, .html, .php, .asp or any other such extension. Take this opportunity to "go extensionless". It will mean you can have much simpler rewrite code (and you can then also ditch the extremely inefficient -d and -f checks).
[edited by: g1smd at 4:26 pm (utc) on Nov 2, 2012]