sharedIP access to sites before they're live

Discussion in 'Tips/Tricks/Mods' started by KenKnight, May 11, 2006.

  1. KenKnight

    KenKnight Member

    Hi all,

    While recently moving all my domains in house, I needed to test the content of a site before I actually moved the domain to my server.

    Since I was unable to find any information about accessing a site with something like http://www.domain.tld/~my_site_name I decided to take a different route.

    While some of the more technically oriented people are familiar with this, the average user or newb isn't, so here it is.

    If you're on a Win2k/XP box, edit the hosts file generally located in c:\windows\system32\etc\drivers\ and add your local server's ip along with the domain name:

    Code:
    192.168.x.x       www.my_server_name.com my_server_name.com
    Then open a command prompt and type in
    Code:
    ipconfig /flushdns 
    Close and reopen any browsers that you have an you'll be able to hit the domain in question directly.

    If you're installing scripts on the server that make calls to the domain name, you'll need to edit /etc/hosts and also add the above ip / name info.

    Just remember that once you're live, you need to remove these settings.

    HTH

    Cheers!
    Ken
     

Share This Page