This is a discussion on How to give personal user url on a dating website just like MySpace does? within the PHP General forums, part of the PHP Programming Forums category; Hello everyone, I had posted a question regarding how to design high traffic fast dating website on different PHP groups. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello everyone,
I had posted a question regarding how to design high traffic fast dating website on different PHP groups. I got a lot of useful responses. I have added links to all the posts below for reference. I am back with another question regarding the dating website. How do I go about creating personal user url on the site like it is done on MySpace.com The personal URL for user1 will look like www.myWebSite.com/user1 (do not click on the link... its the url format I am refering to.. not to this site) The first solution I know is to create a folder for each user and put a index.php script that show the user profile. But then there would be a lot of folders. how can I catch the user1 from the url request string www.myWebSite.com/user1 The ssecond solution would be to set the page not found script in Apache. But then again I need to capture the 'user1' from the request string. I appreciate your help and welcome any suggestions. Thank you. Discussion 1- http://groups.google.com/group/Profe...6e1b11a08c5cf2 Discussion 2- http://groups.google.com/group/php.g...b3b100d70a196e Discussion 3- http://groups.google.com/group/PHP-H...531288b538882e Discussion 4- http://groups.google.com/group/mysql...cff7c40c161889 Discussion 5- http://groups.google.com/group/OOP-P...a2c6e36c3bc006 Discussion 6- http://groups.google.com/group/PHP-M...c403cec4bc14e8 Discussion 7- http://groups.google.com/group/comp....12f83d1cdb278d Discussion 8- http://groups.google.com/group/alt.p...4bf3f43c74f633 |
|
|||
|
PD wrote:
> Hello everyone, > > I had posted a question regarding how to design high traffic fast > dating website on different PHP groups. I got a lot of useful > responses. I have added links to all the posts below for reference. > > I am back with another question regarding the dating website. How do I > go about creating personal user url on the site like it is done on > MySpace.com > > The personal URL for user1 will look like www.myWebSite.com/user1 (do > not click on the link... its the url format I am refering to.. not to > this site) > > The first solution I know is to create a folder for each user and put a > index.php script that show the user profile. But then there would be a > lot of folders. how can I catch the user1 from the url request string > www.myWebSite.com/user1 > The ssecond solution would be to set the page not found script in > Apache. But then again I need to capture the 'user1' from the request > string. > > I appreciate your help and welcome any suggestions. > > Thank you. > > > > > Discussion 1- > http://groups.google.com/group/Profe...6e1b11a08c5cf2 > Discussion 2- > http://groups.google.com/group/php.g...b3b100d70a196e > Discussion 3- > http://groups.google.com/group/PHP-H...531288b538882e > Discussion 4- > http://groups.google.com/group/mysql...cff7c40c161889 > Discussion 5- > http://groups.google.com/group/OOP-P...a2c6e36c3bc006 > Discussion 6- > http://groups.google.com/group/PHP-M...c403cec4bc14e8 > Discussion 7- > http://groups.google.com/group/comp....12f83d1cdb278d > Discussion 8- > http://groups.google.com/group/alt.p...4bf3f43c74f633 > http://httpd.apache.org/docs/2.2/urlmapping.html If your using apache that is. |
|
|||
|
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
Is what you're after. Once that is installed you can define rules to translate URLs such as http://www.website.com/user.php?id=n into more memorable pages such as http://www.website.com/Username. Just remember that if you want to apply rules to the whole server, then the httpd.conf file has to be edited, otherwise, (for directory specific rules) you can add a .htaccess file to your directory. Regards, Kieran N.B. This can be quite difficult to implement successfully. I reccommend you read as much documentation from Apache as you possibly can. Try the Apache group too. |