*.domain.com (undefined subdomains) to specific page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • piku
    Senior Member
    • Mar 2004
    • 153

    *.domain.com (undefined subdomains) to specific page

    wondering if this is possible?

    i have "*.domain.com 14400 IN A 123.123.123.123" ...which currently goes to a default cpanel page. just wondering, has anyone done this, but redirected traffic to another set page instead of the cpanel one (possibly w/ .htaccess wizardry)??? TIA.
    my signature was deleted. i miss my signature-filled-with-helpful-dathorn-links *sniff*sniff*
  • KyleC
    Senior Member
    • Mar 2004
    • 291

    #2
    i dont think wildcard subdomains are possible, i remember a discussion on this on the old forums, and i am pretty sure the answer was no...

    i will look around and see if i can find any info though.
    -Kyle

    Comment

    • Tycho
      Junior Member
      • Mar 2004
      • 14

      #3
      hehe, the guy starting that discussion was me
      it used to be possible to let non-existing subdomains resolve to the main domain. only problem is i don't remember how i did it....
      and i can't look at the dns zones because i recreated the hosting packige i did it on

      Comment

      • -Oz-
        Senior Member
        • Mar 2004
        • 545

        #4
        Would a modification of this work?
        It is very easy to make sure that a user uses http://www.domain.com instead of just http://domain.com with a simple piece of PHP code placed at the top of every page. <?php $server = getenv("HTTP_HOST"); if (!ereg("^www.", $server)) { // Assume no www. has been entered Header
        Dan Blomberg

        Comment

        • piku
          Senior Member
          • Mar 2004
          • 153

          #5
          any findings kylec?

          Originally posted by KyleC
          i dont think wildcard subdomains are possible, i remember a discussion on this on the old forums, and i am pretty sure the answer was no...

          i will look around and see if i can find any info though.
          my signature was deleted. i miss my signature-filled-with-helpful-dathorn-links *sniff*sniff*

          Comment

          • KyleC
            Senior Member
            • Mar 2004
            • 291

            #6
            it used to be that you could edit your DNS zone and add an A record '*' and '*.domain.com'
            and it would work, but the latest from cpanel.net is that it wont work...

            sorry
            Last edited by KyleC; 04-30-2004, 01:55 PM.
            -Kyle

            Comment

            • piku
              Senior Member
              • Mar 2004
              • 153

              #7
              so this is pretty much out of andrew's control? =|
              my signature was deleted. i miss my signature-filled-with-helpful-dathorn-links *sniff*sniff*

              Comment

              • sdjl
                Senior Member
                • Mar 2004
                • 502

                #8
                I'm sure he has control of it.
                I remember my last host adding in a line to the apache httpd.conf file to get wildcard subdomains to work.

                I can't for the life of me remember what it was though

                David
                -----
                Do you fear the obsolescence of the metanarrative apparatus of legitimation?

                Comment

                • KyleC
                  Senior Member
                  • Mar 2004
                  • 291

                  #9
                  Originally posted by sdjl
                  I'm sure he has control of it.
                  I remember my last host adding in a line to the apache httpd.conf file to get wildcard subdomains to work.

                  I can't for the life of me remember what it was though

                  David

                  yep, it can be done, but it can break cpanels auto managment of httpd.conf

                  it would be very easy to do if you had your own box or a vps.
                  -Kyle

                  Comment

                  • piku
                    Senior Member
                    • Mar 2004
                    • 153

                    #10
                    WOOHOO! i think i got it working. it only works on a domain that has a UNIQUE IP ADDRESS. try it to confirm fellas.

                    but i'm wondering if has to have a unique ip... maybe andrew can do it through the http.conf as well... hmmm
                    Last edited by piku; 05-02-2004, 03:06 PM.
                    my signature was deleted. i miss my signature-filled-with-helpful-dathorn-links *sniff*sniff*

                    Comment

                    Working...