Hello All,
I am currently using something like this in my .htaccess file:
RewriteRule ^users/([a-zA-Z0-9_-]+)$ users/profile.php?q=$1
RewriteRule ^users/([a-zA-Z0-9_-]+)/$ users/profile.php?q=$1
I actually copied this from somewhere and doesn't really know why they wrote almost the same thing twice. Anyways what I need now is:
I have tabs in the profile.php page which are like, user profile, user messages, user fans etc etc. (user profile is what i show by default) Now I need that when a person clicks on user messages the URL should be something link:
http://mysite.com/users/username/messages and it should internally change to
http://mysite.com/users/profile.php?q=username&p=messages
Similarly when someone clicks back on user profile the url should be like:
http://mysite.com/users/username/profile and it should internally change to
http://mysite.com/users/profile.php?q=username&p=profile
Also normal:
http://mysite.com/users/username should internally change to
http://mysite.com/users/profile.php?q=username&p=messages
Can someone help me here ??
I am currently using something like this in my .htaccess file:
RewriteRule ^users/([a-zA-Z0-9_-]+)$ users/profile.php?q=$1
RewriteRule ^users/([a-zA-Z0-9_-]+)/$ users/profile.php?q=$1
I actually copied this from somewhere and doesn't really know why they wrote almost the same thing twice. Anyways what I need now is:
I have tabs in the profile.php page which are like, user profile, user messages, user fans etc etc. (user profile is what i show by default) Now I need that when a person clicks on user messages the URL should be something link:
http://mysite.com/users/username/messages and it should internally change to
http://mysite.com/users/profile.php?q=username&p=messages
Similarly when someone clicks back on user profile the url should be like:
http://mysite.com/users/username/profile and it should internally change to
http://mysite.com/users/profile.php?q=username&p=profile
Also normal:
http://mysite.com/users/username should internally change to
http://mysite.com/users/profile.php?q=username&p=messages
Can someone help me here ??