wildcard DNS, cpanel, & .htaccess question

Discussion in 'Apache' started by dtang4, Jul 15, 2006.

  1. #1
    I've been trying to generate subdomain.domain.com's on the fly for a while now for my weblog community. However, my host doesn't allow any changes to the httpd.conf file to enable dynamic virtualhost... so I'm using the method of adding *.domain.com. IN A <ip.address> into my DNS zone file.

    With that, all my subdomains now resolve. However, they load up the default cpanel page (e.g. http://subdomain.nutang.com). I would like to use .htaccess to redirect the subdomain to some page (e.g. domain.com/script.php?id=subdomain). Where do I put the htaccess file? (I tried into "public_html" directory, but that didn't work.) Is it still possible to achieve what I'm trying to do w/o access to the httpd.conf file?

    Thanks in advance for your help!
     
    dtang4, Jul 15, 2006 IP
  2. sreyas

    sreyas Well-Known Member

    Messages:
    128
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #2
    what does your currect .htaccess say, the one which you mentioned as not working??
     
    sreyas, Jul 15, 2006 IP