Redirect to main domain problem

Discussion in 'Apache' started by egamal, Jun 2, 2008.

  1. #1
    I'm using Cpanel to create my subdomains;
    and I created 2 domains and I choose the document_root folder for them ..
    but they just redirect back to the main domain ..!
    subdomain.site.com >> site.com

    I don't know how to make subdomains work using .htaccess files ??
    I used to use this method since ages .. I just don't know what's wrong ..?

    the question is:
    cpanel should be configuring a .htaccess file right ??
    where can i find that file to edit my subdomains in it ..
    my website was under hack by a script kiddie who may was the reason for the "redirect for the main domain" problem so where I can fix my redirection thing ??
     
    egamal, Jun 2, 2008 IP
  2. Trusted Writer

    Trusted Writer Banned

    Messages:
    1,370
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Sounds like your hosting plan don't allow addon domains but parked domains.

    With parked domains your new added names will redirect the the root main domain. You need to get into Cpanel, choose parked domains and then create a redirection to each subdomain.
     
    Trusted Writer, Jun 2, 2008 IP
  3. egamal

    egamal Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    fixed :)
    I'm using wordpress and the site url was
    mysite.com/myblog
    so wordpress uses the base url and rediredcts to it .. that's why it was redirecting to mysite.com ..
    so I now changed the website url in wordpress to the sub domain and I'm now up and working :)

    Thanks anyway :)
     
    egamal, Jun 2, 2008 IP