.htaccess Redirect a subdirectory to its index.php file ← (PHP)

one text

I've been stuck on this one for a long long time. I will try to explain the problem but feel free to ask for more details if it is not clearly explained.

I have two directories, the document root directory and the cms subdirectory. What I am trying to do is to redirect every URL without a subdirectory in it (for example domain.com, domain.com/help) to the index.php of the root directory and in the same time to redirect every URL containing the cms subdirectory (example - domain.com/cms/item) to the index.php of the cms directory. This is my .htaccess file but sadly it is not working:

Options -Indexes -MultiViews +FollowSymLinks
RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(?!cms/)(.+)$ /index.php?u=$1 [NC,QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^cms/(.+)$ /cms/index.php?u=$1 [NC,QSA,L]

Any help will be greatly appreciated as this is a crucial part of the project and it is required as index.php files handle the SEO and include the required files.

Source