Multiple Rewrite Rules in .htaccess To Redirect at desired pages


Staff member
I am trying setup a site where i am creating permalinks just like wordpress but specific to the site. So, when a user clicks on article it should should like


Also when user clicks on directory it should redirect something like this


Similarly, when clicking on sets, users, pages it should redirect respectively like


Following is the code i am using in .htaccess which i am pretty sure is incorrect

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule (.*)$ ./single.php?id=$1 
RewriteRule ^category/(.*)/ category.php?id=$1 [L]

Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$$1 [R=301,L]

Could someone guide me where i am going wrong, i need these pages to call their respective pages i.e. single.php, category.php, sets.php, users.php and page.php respectively to fetch and display data. I am a newbie in .htaccess so, any help is appreciated.