TheMadScientist - 8:14 pm on Mar 28, 2011 (gmt 0)
Okay, it's a bit 'complicated' to solve and part of the solution depends on whether you need query_strings externally or not ... Personally, I get around the issue by only allowing query_strings internally ... To do this, you need to redirect all query_string URLs to 'friendly' URLs, then rewrite the friendly URLs back to the query_string URLs internally ... After doing this, you can strip the query_string from all external URLs, and the best place I know of to learn all the details of mod_rewrite you're going to need to use if you decide to do it is the Apache Forum [webmasterworld.com].
It's really a detailed conversation and site specific answer you're going to need ... It can be done with PHP and making sure your php pages serve a 404 for erroneous query_string, and that's a conversation for the PHP Forum [webmasterworld.com], but personally, I prefer the mod_rewrite solution, because IMO it's 'cleaner'.
ADDED: If you don't feel like searching around for a server header checker, click: control panel at the top of the screen, then server headers (2nd link from the bottom on the left side of the page) and you'll find one of my all time favorites ... it's actually the only one I use unless I need something more detailed (like checking to see if I really get a 304 from custom etag headers), which isn't very often.