dkeeper09 Posted June 27, 2013 Share Posted June 27, 2013 Not sure how to correctly create subject for this. Here is my situation: I am creating an affiiate website for the company I work for. They want an affiliate to be able to sign up on their website, and based on the username that the affiliate gives us, auto-create an affiliate site on our site. So for example, if I signed up with the username bob, our site needs to be replicated at the url www.domain.com/bob My initial reaction for this was to have the site just duplicate itself in a folder based on that username. However, I was later told that we are expecting thousands of people to sign up for this....meaning replicating the site each time isn't exactly ideal. I know there is a way to basically create a url www.domain.cin/index.php?username=bob and have that show up to someone as www.domain.com/bob I was told something about using .htaccess to manage this, but I have no idea where to begin or how to start with this. I currently have the affiliate username being written to a mysql database, so that isnt an issue if I need to store the variable. Any help on this is greatly appreciated. I hope I explained this well enough. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/279617-help-with-user-id-site/ Share on other sites More sharing options...
.josh Posted July 16, 2013 Share Posted July 16, 2013 google "beautify url" lots of tuts on how to do exactly this. Quote Link to comment https://forums.phpfreaks.com/topic/279617-help-with-user-id-site/#findComment-1440974 Share on other sites More sharing options...
requinix Posted July 17, 2013 Share Posted July 17, 2013 Reconsider your URLs for a second. What if people sign up with names like "admin" or "cpanel" or "images"? How about putting the usernames at the second level like /user/bob? Quote Link to comment https://forums.phpfreaks.com/topic/279617-help-with-user-id-site/#findComment-1440987 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.