In that case, you could use mod_rewrite (assuming your webserver is Apache and mod_rewrite is available) like so:
RewriteEngine On
RewriteRule ^index.php(/.*)$ index.php?path=$1
That would, for example, redirect index.php/id/29/foo/bar to index.php?path=/id/29/foo/bar/ .