[Discuss] DNS redirect to custom content page
Rick Morris
rmorris at infinity.bc.ca
Mon Jul 24 22:54:17 PDT 2006
You're correct, it's not bind that does this, it's the webserver.
When you connect to the webserver, the client tells the webserver what host it
wants, see http://www.apacheweek.com/features/http11 for a description.
So in the default host you put your script that checks the SERVER_NAME
variable and serves up the page for that name.
You can also do this with mod_rewrite. In fact, you can do just about anything
with mod_rewrite, but that's not always a good thing.
Rick Morris
On Monday 24 July 2006 20:26, R. McFarlane wrote:
> Hello all,
>
> Okay, I know the subject line might be a little vague, so
> here it goes with more detail (I hope that makes sense).
>
> When a domain name request comes into my server, and that
> domain name is not setup (eg : it's a newly created domain name) with
> it's own web space yet, I would like to "redirect" to a page on the
> web server that loads a "newly registered" type web page but the
> content of the web page will have ad words like ads that need to be
> triggered on the domain name (eg : instantcreditnow.com would load credit
> ads). From what I know of bind, this is not possible (please
> correct me if I am wrong). As such, I think I need to use PHP (or
> something similar) to do what I want by checking the referrer
> information. This custom scripted page would have to be the
> index/default page of course for where bind redirects the requests to
> (eg : DNS query --> bind --> web server --> php).
>
> Does anyone have any insights?
>
> Thanks in advance!
>
More information about the Discuss
mailing list