470,848 Members | 2,210 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

How to give personal user url on a dating website just like MySpace does?

PD
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

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

May 8 '06 #1
4 3629

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

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.


Only thing I could think of would be mod_rewrite on the Apache end in
this case, sorry..

Phil


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


May 8 '06 #2
NC
PD wrote:

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


Use mod_rewrite:

http://httpd.apache.org/docs/mod/mod_rewrite.html

With mod_rewrite, you can define URL rewriting rules. Say, every time
Apache receives a request to show /user1, it would actually show, say,
/index.php?user=user1. Since no redirection is involved, the user
still sees /user1 in her browser's address bar...

Cheers,
NC

May 8 '06 #3
On Mon, 08 May 2006 14:30:09 -0700, PD wrote:
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.


As a way of helping you find out what you need rather than telling you the
answer, the best way of finding this out is to set the ErrorDocument in
Apache to be a script called debug.php where the contents of that file is
just:

<?php
phpinfo();
?>

Then look at the $_SERVER variables to see which ones contain the
information you need.

Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

May 10 '06 #4
mod_rewrite is how they do it.

"PD" <pd****@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
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

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

May 10 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Joshua Beall | last post: by
5 posts views Thread by Michael Lawrence | last post: by
7 posts views Thread by fbionyourtail | last post: by
4 posts views Thread by marvado | last post: by
1 post views Thread by mac | last post: by
1 post views Thread by amiri.arash | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.