SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2004
    Location
    york
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it possible to ignore the hosts file

    Hi,

    If I'm working on a development site, I set the hosts file to point to my version of the website. However, there are times I'd like to simultaneously have the current live site open at the same time so that I can transfer over content etc.

    I don't want to be constantly commenting out the hosts file and flushing the DNS and thought that I might be able to access the live site by its IP address rather than domain name but it's timing out. Same happens when I ping the domain name through command prompt.

    I just wandered if anyone had any ideas for an alternative way to approach this. I've tried dropping the www but it still redirects and then picks up my hosts file which sends it back to my version.

    Hope that make sense and thanks in advance for any suggestions.

  2. #2
    SitePoint Evangelist pip's Avatar
    Join Date
    Jun 2001
    Location
    Cape Town, South Africa
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not just used a different host name for your development site? What I would do is add an entry in hosts like,

    127.0.0.1 dev.mysite.com

    So that the dev site would always point there, and I can still load the live site simutaneously
    - Pip
    ---------------------------------------------------------------------------------
    Nothing takes the taste out of peanut butter quite like unrequited love.

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2004
    Location
    york
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Pip,

    That's a simple but brilliant solution that I'm embarrassed not to have thought of myself!

    Many thanks.

  4. #4
    SitePoint Evangelist pip's Avatar
    Join Date
    Jun 2001
    Location
    Cape Town, South Africa
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not to worry. We all have our moments and as developers, tend to always try and over complicate things. But it's the simple ways that tend to work best
    - Pip
    ---------------------------------------------------------------------------------
    Nothing takes the taste out of peanut butter quite like unrequited love.

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,625
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Why bother with hosts, just use an alternate port.

  6. #6
    SitePoint Evangelist pip's Avatar
    Join Date
    Jun 2001
    Location
    Cape Town, South Africa
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    Why bother with hosts, just use an alternate port.
    Must say, I do prefer the hosts approach. Quick and easy.

    The port thing would also do the trick, but I hate having to do the "domain colon port" thing when accessing my sites. Preference I 'spose
    - Pip
    ---------------------------------------------------------------------------------
    Nothing takes the taste out of peanut butter quite like unrequited love.


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
  •