Jump to content

How to create User Profile URLs


r00tk1LL

Recommended Posts

What I am basically trying to do is create a rule that when some one browses to www.mysite.com/username it redirects the user to a dynamically generated profile page (I.E. profile.php using the username as a variable)

 

and if they go to www.mysite.com it takes you to the home page...

 

Is this the right approach to take, if so how would I go about it? If not what would be the right approach to give users their own profile urls??

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/147766-how-to-create-user-profile-urls/
Share on other sites

you can do that, but it restricts what your folder and page names can be. i would do the profile pages like:

www.mysite.com/user/username

 

then you can do an apache mod_rewrite in an .htaccess file to map those to:

www.mysite.com/user.php?user=username

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.