Click to See Complete Forum and Search --> : Create unique url for each member


rsouthon
07-19-2005, 12:03 AM
I'm really not sure if what I need to do this, but maybe someone can help anyway. I have a member-based site (all .php pages) and want each member to be able to access their site from a specific address, like http://www.mysite.com/username, where "username" can be set (and changed) by the user at anytime.

Do I need to create a new folder for each user? Can i use redirects? What is the standard for doing this?

Thanks!
ROB

ray326
07-19-2005, 04:25 PM
The standard way to do this is to create a dir for each user. Allowing a name change isn't a good idea.

rsouthon
07-20-2005, 04:39 PM
well i need users to be able to change the name, so folders don't seem like a good idea. i ended up using the .htaccess file like this:

RewriteEngine on
RewriteRule ^UserName$ /UserPage.php?sb_id=userid

Everytime the user changes their wanted url, i just use PHP to update the htaccess file. Works great!