6

It took me a while to learn that I have to put a dot after the "localhost" in the URL so that I can use fiddler with my development server.

Why do I need to put this dot here to make fiddler work for my local:

http://localhost.:1888/MyPage.aspx

What does it stand for?

thanks

Piskvor left the building
  • 91,498
  • 46
  • 177
  • 222
pencilCake
  • 51,323
  • 85
  • 226
  • 363
  • highly recommend http://www.mozilla.com/en-US/firefox – RCIX Nov 23 '09 at 01:47
  • Similar problem, but I think my work around is much more elegant: go to `C:\WINDOWS\system32\drivers\etc\` and open up a file named `hosts`, append this as a new line `127.0.0.1 localhost.localdomain`. From now on access your local development site as `http://localhost.localdomain/` instead. – Trav L Nov 23 '09 at 01:53

2 Answers2

12

It's not that you're making fiddler work, but you're making Internet Explorer work. Internet Explorer is written specifically to bypass the proxy server for "localhost" . By attaching a trailing dot, you're providing a valid DNS name that does not match the mechanism within IE that checks the domain (IE does a stricmp(userdata, "localhost") or equivalant).

EricLaw
  • 56,563
  • 7
  • 151
  • 196
atk
  • 9,244
  • 3
  • 32
  • 32
  • Yup. You could set the HookWithPAC registry key as an alternative to sticking the dot after localhost, because when a PAC script is used instead of a direct proxy registration, LOCALHOST requests are eligible for proxying. http://stackoverflow.com/questions/1577772/force-visual-studio-to-start-development-server-using-the-hostname-localhost-wi – EricLaw Nov 21 '09 at 13:49
  • 1
    More info on: http://www.fiddler2.com/fiddler/help/hookup.asp as well. You can check the tıtle: "Why don't I see traffic sent to http://localhost or http://127.0.0.1?" – pencilCake Nov 30 '09 at 08:57
0

localhost. just makes the hostname visible to Fiddler; otherwise, IE bypasses proxies.

You can also substitute "ipv4.fiddler" for "localhost" -- which can help prevent confusion, since the dot is easy to miss.

RickNZ
  • 18,448
  • 3
  • 51
  • 66