>>282
index.*を消したいだけなら

$path="path/to/index.html?fuga=hoge";
echo preg_replace('/index\.\w+/','',$path);