Want to right rule which can do just like this but remember sometimes the second variable named as name can come empty also so want to check that too
Example
Scene1 : example.com/user/name == example.com/index.php?var1=user&var2=name
Scene2 : example.com/user == example.com/index.php?var1=user
One htaccess which can work in both scenes
How do i do that?????????????