user friendly url without filename in core php site

I have a link www.example.com/folder/filename.php?cid=1&title=Chekcing

I want to make user friendly url from above link to : www.example.com/folder/1/Checking/

I have an .htaccess code :

**

    Options +FollowSymLinks -MultiViews
    RewriteEngine On
     RewriteBase /

    RewriteCond %{THE_REQUEST} ^GETs([^.]+).phps [NC]
    RewriteRule ^ %1 [R,L]
    RewriteCond %{THE_REQUEST} ^GETs([^.]+).php?cid=([^&s]+)&title=([^&s]+) [NC]
    RewriteRule ^ %1/%2/%3? [R,L]
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME}.php -f 
    RewriteRule ^(.+?)/([^/]+)/?$ $1.php?cid=$2&title=$3[QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.php -f
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule ^(.*?)/?$ $1.php [L]

**

But it only returns filename without .php : **www.example.com/folder/filename/1/Checking**

I want to remove filename too, from the url…

Thanks in Advance…


Source: .htaccess

Leave a Reply