Click to See Complete Forum and Search --> : getting a dynamic alias from the domain url


dmeikle
August 10th, 2005, 06:18 PM
I'm trying to figure out how to do this:

a user signs up and can use my domain name for their personal online usage. they can prefix the domain name with their username
eg: dmeikle.quantumunit.com instead of www.quantumunit.com

the page should load, grab the info from the database based upon the domain alias (dmeikle .. the username) and display the custom page without so much as a hiccup.

how do you configure the server and the software to do this? :confused:

cjard
August 11th, 2005, 09:34 AM
use a DNS setup whereby *.quantumunit.com is sent to your web server

webserver software these days usually has ability to inspect host headers itself, and send to a different page based on that.. otherwise you can route everything through one servlet that examines the header and forwards the request to the correct place via the dispatcher

cjard
August 11th, 2005, 09:35 AM
i.e. the HTTP request headers, one of them will say:

Host: dmiekle.quantum.com


so your code or your web server can read this header and alter the destination based on it