Samn has asked for the wisdom of the Perl Monks concerning the following question:

Replies are listed 'Best First'.
Re: Wildcard DNS and Perl
by PodMaster (Abbot) on Nov 08, 2002 at 14:48 UTC
    Don't you people know, apache is perl, just use Apache::PerlSections ;)(i know about it cause of ar0n/jcwren)

    ____________________________________________________
    ** The Third rule of perl club is a statement of fact: pod is sexy.

Re: Wildcard DNS and Perl
by iburrell (Chaplain) on Nov 08, 2002 at 00:03 UTC
    What host control panel has a "Wildcard DNS" option? Wildcard DNS is something used on DNS servers, not operating systems. Do you mean some DNS hosting service that hosts the domain? Or the Apache configuration? Wildcard DNS basically means any host not defined in the zone is caught by the *.domain.tld entry and sent to that address.

    It should be possible host wildcard DNS with Apache. This isn't necessarily a Perl question. You could write a mod_perl module to do the redirection. You may have to do this if there is a complicated lookup for There are likely ways to do it that don't involve Perl. You can even do it that doesn't require a redirect (ie server http://username.domain.tld). Look at mod_rewrite, RedirectMatch, and _default_ vhost.

      Let me narrow it down a bit for you: use apache's mod_rewrite for URL rewriting.