I have a redirect working fine as follows:
RewriteRule ^folder/(.*)$ /file.php?variable=$1 [L,QSA]
So it will send domain.com/folder/foo –> domain.com/file.php?var=foo
But when there is no subdirectory included I want to redirect to a different file like domain.com/folder –> domain.com/file_2.php
Is this possible? How can I order these to detect when no subdirectory name is included? Right now no matter what I try, it simply takes the “blank” value and passes it as the foo variable.