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 and htaccess

Discussion in 'Bind/DNS/Nameserver' started by MrLeN, Dec 16, 2012.

  1. MrLeN

    MrLeN Active Member

    Joined:
    Dec 12, 2010
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    56
    I have been trying to work out how to set up wildcard DNS all afternoon. There's a heap of articles online, but they all say something different. I've had a gut full. So, since I am using WHM, I have decided to come here and ask.

    Basically, I want a page like this:

    www.mywebsite.com/p/USERNAME1/
    www.mywebsite.com/p/USERNAME2/
    www.mywebsite.com/p/USERNAME3/
    etc..

    to load at:

    USERNAME1.mywebsite.com
    USERNAME2.mywebsite.com
    USERNAME3.mywebsite.com
    etc..

    I know as much as that I need "wildcard DNS". But trying to figure out exactly how to accomplish that has started giving me a headache. Can someone please just tell me where to go in WHM and what to change? Please? Before my face explodes?

    I also know that's only half my problem. I've read enough articles to know that I will ALSO need a htaccess code to handle the actual redirection. If someone can help me make htaccess code that will allow:

    USERNAME.mywebsite.com

    to display the page from:

    www.mywebsite.com/p/USERNAME/

    ..I will sincerely appreciate it. I know that there's people who can do the above in 35 seconds. I have so far been unable to understand anything in hours of reading. If anything, I have only got more confused, because EVERY article says something different, and I don't want to start messing around with DNS and explode my whole server, as well as my face. That's too many explosions for one guy in one day.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 MrLeN, Dec 16, 2012
    Last edited: Dec 16, 2012
  2. Travis

    Travis Active Member

    Joined:
    Apr 24, 2002
    Messages:
    31
    Likes Received:
    3
    Trophy Points:
    383
    cPanel Access Level:
    Root Administrator
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