friendly urls with .htaccess
===

I am using the following .htaccess code in my website to redirect all the urls to index.php


    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l
    
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
 then I am checking the url and see if the name of the page is available in the database. Then I am redirecting the user the that specific page if it is found like so:

    www.mywebsite.com/videos.php?v=Name_of_the_video
    www.mywebsite.com/images.php?i=Name_of_the_image
    www.mywebsite.com/users.php?u=Name_of_the_user

as you can see I have 3 main types of pages. I want to use .htacces so I can convert those urls like so:

    www.mywebsite.com/videos/Name_of_the_video
    www.mywebsite.com/images/Name_of_the_image
    www.mywebsite.com/users/Name_of_the_user

