crobb305 - 6:17 pm on Mar 27, 2010 (gmt 0)
Well by "searching around", I do mean in the mod_rewrite tutorials and on this forum. Certainly, I wouldn't use some random code from an untrusted resource. I am trying to be very careful and meticulous.
I guess the reason the example.com/?filename was bothering me is because it stems from a legitimate request for "filename". Someone, somewhere, is (or was) linking to me this way, and Googlebot is requesting it. I just thought there was a way to strip that out "?". The code you shared above is working perfectly. I have excluded all scripts and everything is working fine. I will just allow the /?filename to redirect to the homepage and not fret over it, considering that it is the last remaining "404" I have to cover (as showing up in Google Webmaster Tools)
By the way, I didn't realize that I somehow double posted last night (worked very late). It looks like I tried to edit a post to add a sentence and make corrections, but for some reason it reposted.
Thanks again Jim for all your help.