I am making a social networking site where I have created my own PHP mvc but I am having problems in url rewriting. My mvc works this way.
If this is the domain www.example.com/manage/posts/11111 , manage is the class, post is the method in that class & 1111 is a parameter.
The problem is that I cannot create vanity profile urls since they will not work. I want each user to have vanity profile url ie www.example.com/username but this will search for a class named username.
Kindly advise me on how
a) I can achieve vanity profile urls such as www.example.com/username without adding anything such as www.example.com/users/username.
I know there a other PHP MVCs but I just want to use my own
This is my current htaccess code::
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.php?ref_url=$1 [NC,L,QSA]
</IfModule>