The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

New Server test site (with IP) forwards to domain-com on 'old' server

Discussion in 'General Discussion' started by friedbrain, Feb 3, 2012.

  1. friedbrain

    friedbrain Member

    Joined:
    Feb 2, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    A funny things happens on some domains.
    I have a domain name assigned a certain IP, say 111.111.111.111 is associated with domain-com. But the IP is on the new server where I'm setting everything up while the sites are still running on the old server.

    When I go to the http://IP it takes me automatically via a 301 redirect to domain-com. Even the
    http://IP/~username/ does the same. I need to really test them on the new server
    before switching though so can I turn this (whatever it is) off?

    Thanks
     
  2. friedbrain

    friedbrain Member

    Joined:
    Feb 2, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Sorry to bump this thread but it's happening to my other accounts.
    Where I have a dedicated IP assigned to a domain name, it forwards to the name.com when I visit http://ip.number/
    Sucks because I can't test the site before switching servers.

    Any work around? Is it the ns settings?

    Thanks,
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might check your settings here: WHM > Security Center > Apache mod_userdir Tweak

    And you might check the accounts for unwanted htaccess settings.

    Not sure what else it would be off hand.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You likely have a redirect in the .htaccess file as Infopro mentioned. However, you may also need to check the script configuration. Sometimes a script will have a setting for domain name, and will automatically redirect to it as opposed to using the URL in the address bar. In these cases, you should adjust the script configuration to the IP address temporarily.

    You could also update the hosts file on your own machine to point the domain name to the new IP address. At that point, you could access the domain name directly.

    Thank you.
     
  5. friedbrain

    friedbrain Member

    Joined:
    Feb 2, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks guys,
    it was the hosts file on my Windows machine that worked. I tried figuring out the rest but gave up. After all it worked well in the old server and want it to work the same on the new one.
     
    #5 friedbrain, Feb 7, 2012
    Last edited: Feb 7, 2012
Loading...

Share This Page