I am building a PHP application. For my application, user’s profiles / pages are setup and displayed intially by visiting domain.com/username or domain.com/accountnumber.
My question is this – how do you do that, while retaining the ability to make informative application pages that have the url of domain.com/pagename? My main example of this is vimeo, which has vimeo.com/about, vimeo.com/developers, etc., while allowing you to set your username to vimeo.com/username. My concern is that I will launch my application and not have the ability to create the link I want to in the future because it is taken as a username.
What would be your advice, or what has been your experience? Is there a common list to reserve that is recommended? I am not sure what to do. Thanks for the help.
There are a number of ways you can achieve what you asking – read up on routes and routing to gain a better understanding.
Many frameworks offer a way in achieving what you are asking – Zend Framework being one.
Alterantivly, if you are building it from scratch you could implement a different structure i.e.
This effectivly ensures your urls cannot be affected by someone username. You’ll need to look into Mod Rewrite if using creating your own routes.