You could do that with a simple:
<?php
if (strlen($_SERVER['PATH_INFO']) > 0)
{
header("location: $_SERVER[SCRIPT_NAME]?$_SERVER[QUERY_STRING]");
}
?>
Also, in Apache2 you can set AcceptPathInfo to off (it might even be off as default)...
However, you should give full URIs to your stylesheets etc ;)
