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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.