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!

****.yourdomain.com >redirect> www.yourdomain.com

Discussion in 'General Discussion' started by mahdionline, Mar 24, 2004.

  1. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    166
    Hi

    I want to develop a weblog system such as bloger. but i have only one problem in my work and i think i should solve it by dns setting in my linux server.

    i want that every one that type any(****).mydomain.com redirected to www.mydomain.com. because if a add a subdomain per user my httpd.conf become very large.

    how can i do this ?? :confused:

    Regard
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    166
    you say me to add a subdomain. but when a weblog have 10000 user , the httpd.conf become very very large.

    and when a user signup in weblog system for a new blog, system don't should add a sundomain( dns entry) per user.

    i want to use a wildcard and recegnition users by username that enter before domainname ( username.mydomain.com)

    and my problem is that how can i set my httpd.conf that anyone that type anyusername.mydomain.com redirected to www.mydomain.com
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    166
    Just like thaphantom said.

    edit the zone for mydomain.com by adding an A entry of *

    Then edit httpd.conf to ensure that it has the *.mydomain.com alias.

    This will give you your wildcard.
     
  4. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    166
    hi and thanks,

    i do that , but this site is name base and havenot an dedicated ip.

    when i add an A entry for this site then when i type ****.mydomain.com , it redirect to main ip of server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    166
    edit httpd.conf to ensure that it has the *.mydomain.com alias.

    Add this line in your virtual server in httpd.conf

    ServerAlias *.mydomain.com

    then

    httpd restart
     
  6. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    166
    very very thanks !:D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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