Results 1 to 4 of 4

Thread: www keeps redirecting to new-subdomain instead of www.domain

  1. #1
    Join Date
    Apr 2009
    Beans
    Hidden!

    Question [SOVED] www keeps redirecting to new-subdomain instead of www.domain

    [SOLVED]

    I recently added a subdomain and as a result the subdomain www.domain.tld now points to the new-subdomain.domain.tld instead of the domain.tld. The domain.tld however continues to work as expected. This is my first subdomain. I tried all kinds of DNS stuff to no avail.

    My DNS. @ means domain.tld.

    A record.
    @ 1.2.3.4

    CNAME records.
    www @
    new-subdomain @

    I apt-get apache2 and enable mod_rewrite via a2enmod rewrite and make no other changes to /etc/apache2. Except in /etc/apache2/conf.d. In /etc/apache2/conf.d I create the subdomain file called new-subdomain. I made no other changes at all to the rest of the apache2 dir. So what gives with www going to the new-subdomain?

    <Directory /some/directory>
    Options FollowSymLinks
    AllowOverride Limit Options FileInfo
    </Directory>

    <VirtualHost *:80>
    DocumentRoot /some/directory
    ServerName new-subdomain.domain.tld
    </VirtualHost>
    Last edited by MechaMechanism; September 5th, 2009 at 07:06 PM. Reason: Removed URL auto parsing

  2. #2
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: www keeps redirecting to new-subdomain instead of www.domain

    Can you post your configuration files here? I have an idea what it might be.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  3. #3

    Re: www keeps redirecting to new-subdomain instead of www.domain

    you need to create a vhost for the `www' subdomain which is first and a second vhost for your own subdomain. Virtual hoats are resolved `bottom up', apache checks the last vhost to see if it matches the dommain, if it doesnt it checks the second-last one and so on. if none match the first gets displayed.
    im dyslexic, please don't comment on my spelling
    blender 3d artist, visit my portfolio
    Quad-Ren, Open source, resolution independent 2D graphics engine
    Screen space is a precious resource, don't waste it

  4. #4
    Join Date
    Apr 2009
    Beans
    Hidden!

    Re: www keeps redirecting to new-subdomain instead of www.domain

    Quote Originally Posted by hessiess View Post
    you need to create a vhost for the `www' subdomain which is first and a second vhost for your own subdomain. Virtual hoats are resolved `bottom up', apache checks the last vhost to see if it matches the dommain, if it doesnt it checks the second-last one and so on. if none match the first gets displayed.
    Yeah that's what I did. I made my www subdomain file and then it worked.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •