0

Maybe this question was already asked million times. But I still haven't find the right answer for my problem.

I want to pass username in url just like what other social networking sites like facebook do. The url should be like : www.mysite.com/username and need to be rewrite as www.mysite.com/?ref=username

but every time I tried to load another page like www.mysite.com/register/ it won't take me to that dir but rewrite that url instead.

this is my .htaccess

RewriteEngine on 
RewriteCond %{REQUEST_URI} !^/member-area/?$
RewriteCond %{REQUEST_URI} !^/register/?$
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
#hiding .php extension
RewriteRule ^(.*)$ $1.php
RewriteRule ^([a-zA-Z0-9_-]+)$ ?ref=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ ?ref=$1

what is wrong with that? I'm really sorry for asking this question, but I kinda stuck on this situation.

0 Answers0