How do i get Apache rewrite to complete the next...

have a url received as:

domain/somename/index.php?query=1&anotherquery=2

and alter it to:

domain/index.php?query=1&anotherquery=2&name=somename

cheers, Omer.

Do this rule inside your .htaccess file:

RewriteRule ^([^/]+)/index\.php$ index.php?name=$1 [QSA]