Allow the 1.x style urls to still work on 2.x

I recently upgraded from 1.x to 2.x, and today users started to complain that the URLs that they had in sites and documents stopped working. I tried to fix it with mod_rewrite, so here it is

What this does it: 
/index.php?sid=85725&lang=pt
is redirected to:
/index.php/85725/lang-pt