I am designing a website(www.XXXXX.com),
and for the registered users I want to
give there home page address as
www.userid.XXXXX.com. So when the
person types www.userid.XXXXX.com on
the browser I want it to convert
Ex:- www.mark.XXXXX.com will become
How can I achieve the above functionality.
Please feel free to suggest if there is
a better alternative.
Wouldn't http://userid.XXXXXX.com be better? You don't need the www. To implement this you need to talk to your IPP about subdomains. There are two ways they can implement them.
First they can offer wildcard subdomains. The way this works is that anything.XXXXXX.com points to your root directory. You then use a script of some sort to redirect them to the appropriate directory based on the requested URL.
The second way is better because it doesn't require script based redirection. Your IPP would place an entry in the server's log file for each user. Then user1.XXXXX.com would be pointed directly at their directory. This requires more work up front when setting up each account but it is better in the long run and easier to maintain.
Internet Media Provider