Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Wildcard DNS: DirectoryIndex breaks for subdomains

Discussion in 'Bind/DNS/Nameserver' started by offtone, Jan 25, 2009.

  1. offtone

    offtone Registered

    Joined:
    Sep 26, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    151
    Alright, here's the setup: I've got *DNS enabled on two servers. On one, I hacked the httpd.conf and replaced

    With:

    On the other, I simply added * as a subdomain through cPanel (after realising I could actually do that. Handy trick, that.)

    Now, server 1 (the hacked httpd.conf server) is the one I used to be on, and I had a fancy little subdomain setup that leveraged mod_rewrite to redirect something.domain.com to domain.com/subdomains/something. This works on both servers just fine. The problem, though, is this:

    In my .htaccess file for domain.com, I have this:

    So this basically gets rid of those hideous Apache indexes. Simple stuff, really. However, on the new server with the * subdomain, it doesn't work.

    http://user.domain.com/ shows this error:

    Wait, what? /subdomains/user/draw_index.php isn't where it should be looking... It SHOULD be looking in /.

    It works FINE if I go to http://www.domain.com/subdomains/user/.

    My question is this: Why does the other server work fine, and not this one? The only difference is in the way *DNS is setup, and I cannot figure out why it's suddenly confusing the root for subdomains.

    Sorry if this was confusing! I'll do my best to clarify upon request. Thanks in advance for any suggestions.
     
    #1 offtone, Jan 25, 2009
    Last edited: Jan 25, 2009
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice