473,462 Members | 1,350 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Personalised URL

How does one go about creating personalised URLs

What I want is for the user to go to www.mysite.net/johndoe where johndoe is
a record in MYSQL & then generate an html page on the fly populating the
page with the fields from his record that will say something like "Welcome
John Doe, thank you for visiting your own personal page etc...."

What I dont want to do is have thousands of html pages sitting on the server
waiting for the prospective users to access their pages. It would be a
generic page with certain fields I would like to populate with the specific
data when requested.

The bit that I can't figure out is how to get a request for
www.mysite.net/johndoe to make this happen without tagging johndoe as a
variable eg www.mysite.net/$USER=johndoe

Any ideas?

Thanks

Dave

Jul 17 '05 #1
5 3272
generaly I use an ErrorDucment directive in the httpd conf file the this
document will look at the url and do the apropriate thing.

You can also do something like

http://johndoe.mysite.com

have the index.php page look at the host name (johndoe) and send the
apropriate contents

just do something like this in the httpd conf files
ServerAlias *.mysite.com
DocumentRoot /vhost/mysite/users/
and in dns
* IN CNAME www
--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Dave" <none> wrote in message
news:40**********************@news.astraweb.com...
How does one go about creating personalised URLs

What I want is for the user to go to www.mysite.net/johndoe where johndoe is a record in MYSQL & then generate an html page on the fly populating the
page with the fields from his record that will say something like "Welcome
John Doe, thank you for visiting your own personal page etc...."

What I dont want to do is have thousands of html pages sitting on the server waiting for the prospective users to access their pages. It would be a
generic page with certain fields I would like to populate with the specific data when requested.

The bit that I can't figure out is how to get a request for
www.mysite.net/johndoe to make this happen without tagging johndoe as a
variable eg www.mysite.net/$USER=johndoe

Any ideas?

Thanks

Dave

Jul 17 '05 #2
*** Dave wrote/escribió (Thu, 18 Mar 2004 14:51:53 -0000):
What I want is for the user to go to www.mysite.net/johndoe where johndoe is
a record in MYSQL & then generate an html page on the fly


You need Apache web server, one html page and mod_rewrite. The
www.mysite.net/johndoe URL is transformed into
www.mysite.net/show.php?id=johndoe before processing the page and it's
transparent to user. I don't know whether there's a similar feature in IIS.
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #3
Dave wrote:
How does one go about creating personalised URLs

What I want is for the user to go to www.mysite.net/johndoe where johndoe is
a record in MYSQL & then generate an html page on the fly populating the
page with the fields from his record that will say something like "Welcome
John Doe, thank you for visiting your own personal page etc...."

What I dont want to do is have thousands of html pages sitting on the server
waiting for the prospective users to access their pages. It would be a
generic page with certain fields I would like to populate with the specific
data when requested.

The bit that I can't figure out is how to get a request for
www.mysite.net/johndoe to make this happen without tagging johndoe as a
variable eg www.mysite.net/$USER=johndoe


What you need to use is $_SERVER['PATH_INFO'].

If your URL is:
www.mysite.net/index.php/johndoe
The script index.php will be run and in that script:
$_SERVER['PATH_INFO'] == 'johndoe';

Jul 17 '05 #4
CountScubula, Alvaro, Kevin

Many thanks for your replys

I now have a good idea of where to start

Regards

Dave
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 20/02/2004
Jul 17 '05 #5
If rewrite isn't installed on the server, you can set the 404 handler to a
PHP page and get the path in $_SERVER["REDIRECT_URL"].

Uzytkownik "Dave" <none> napisal w wiadomosci
news:40**********************@news.astraweb.com...
How does one go about creating personalised URLs

What I want is for the user to go to www.mysite.net/johndoe where johndoe is a record in MYSQL & then generate an html page on the fly populating the
page with the fields from his record that will say something like "Welcome
John Doe, thank you for visiting your own personal page etc...."

What I dont want to do is have thousands of html pages sitting on the server waiting for the prospective users to access their pages. It would be a
generic page with certain fields I would like to populate with the specific data when requested.

The bit that I can't figure out is how to get a request for
www.mysite.net/johndoe to make this happen without tagging johndoe as a
variable eg www.mysite.net/$USER=johndoe

Any ideas?

Thanks

Dave

Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jez | last post by:
I need to be able to send individual personalised emails to contacts stored in a database. I'm able to do this using mail() and a loop, but I've read that this isn't a very good idea as there could...
9
by: AJ | last post by:
Hi All I've got a little newsletter system that I put together for one of my customers. Basically, it's a table with firstname, lastname and e-mail address. The script then goes through the...
4
by: Jonah Olsson | last post by:
Dear All, I'm currently developing a solution where large amounts of personalised emails are being created (and no, this is not spam...) on the ASP.NET platform and being delivered by a Debian...
0
by: BLob | last post by:
Hello, I am building a system to deal with inscriptions to events. There is a backoffice which allows administrators to send emails to all or to a sub-set of the participants. The administrators...
5
by: Chris Sharman | last post by:
Anyone know a good, current reference ? I found Meyer's table (now moved to http://www.ddj.com/webreview/style/css1/charts/mastergrid.shtml ) and it's 5 years since the last update. Most other...
0
by: windandwaves | last post by:
Hey Folk Does anyone know of a php class that allows you to build a personalised homepage a la Google? Is this hard to make? I know these are stupid questions, but I am completely new to...
0
by: Balaji | last post by:
Hi , I found nice free email service http://www.affiliatecurry.com/affiliate/trackingcode.php?aid=2258&linkid=T39
2
by: M | last post by:
Could anyone please help me out? I am working on a new Intranethomepage for our company, and I really, really would like to make something similar to http://www.google.nl/ig? hl=nl . There you...
0
by: sacco | last post by:
I need to develop a personalised software agent (Ebot) that will help me search the internet ( car sales websites) for vehicles being sold. I would appreciate any help
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.