Turn locahost into com

Is it possible (for testing purposes) turn a locahost into somename.com?

Thanks
Mark Goldin [ Do, 27 September 2007 19:57 ] [ ID #1830691 ]

Re: Turn locahost into com

"Mark Goldin" wrote:
> Is it possible (for testing purposes) turn a locahost into somename.com?

If you add an entry to your hosts file, sure.

Start
Run
notepad.exe c:\windows\system32\drivers\etc\hosts



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Dave Anderson [ Do, 27 September 2007 21:01 ] [ ID #1830692 ]

Re: Turn locahost into com

192.168.1.75 mark #PRE #DOM:testing
I am trying to add this line.
But http://mark.testing:8080/ does not work while http://192.168.1.75:8080/
works fine. What am I doing wrong?


"Dave Anderson" <NPQRWPDWZGSP [at] spammotel.com> wrote in message
news:OHoKHjTAIHA.5328 [at] TK2MSFTNGP05.phx.gbl...
> "Mark Goldin" wrote:
>> Is it possible (for testing purposes) turn a locahost into somename.com?
>
> If you add an entry to your hosts file, sure.
>
> Start
> Run
> notepad.exe c:\windows\system32\drivers\etc\hosts
>
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message.
> Use of this email address implies consent to these terms.
Mark Goldin [ Do, 27 September 2007 21:18 ] [ ID #1830693 ]

Re: Turn locahost into com

Mark Goldin wrote on 27 sep 2007 in
microsoft.public.inetserver.asp.general:

> Is it possible (for testing purposes) turn a locahost into somename.com?

Not with ASP.

ASP is a serverside platform, so cannot change your pc.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
exjxw.hannivoort [ Do, 27 September 2007 21:34 ] [ ID #1830694 ]

Re: Turn locahost into com

Did you try http://mark:8080/

Brian

In article <#F4s7sTAIHA.4592 [at] TK2MSFTNGP03.phx.gbl>, Mark Goldin wrote:
> From: "Mark Goldin" <mgoldin [at] ufandd.com>
> Subject: Re: Turn locahost into com
> Date: Thu, 27 Sep 2007 14:18:41 -0500
> Newsgroups: microsoft.public.inetserver.asp.general
>
>
> 192.168.1.75 mark #PRE #DOM:testing
> I am trying to add this line.
> But http://mark.testing:8080/ does not work while http://192.168.1.75:8080/
> works fine. What am I doing wrong?
>
>
> "Dave Anderson" <NPQRWPDWZGSP [at] spammotel.com> wrote in message
> news:OHoKHjTAIHA.5328 [at] TK2MSFTNGP05.phx.gbl...
> > "Mark Goldin" wrote:
> >> Is it possible (for testing purposes) turn a locahost into somename.com?
> >
> > If you add an entry to your hosts file, sure.
> >
> > Start
> > Run
> > notepad.exe c:\windows\system32\drivers\etc\hosts
> >
> >
> >
> > --
> > Dave Anderson
> >
> > Unsolicited commercial email will be read at a cost of $500 per message.
> > Use of this email address implies consent to these terms.
>
Brian Staff [ Do, 27 September 2007 21:42 ] [ ID #1830695 ]

Re: Turn locahost into com

"Mark Goldin" wrote:
> 192.168.1.75 mark #PRE #DOM:testing
> I am trying to add this line.
> But http://mark.testing:8080/ does not work while
> http://192.168.1.75:8080/ works fine. What am I doing wrong?

In the IIS console, check the [Advanced...] web site identification
properties to ensure that the host headers are accounted for if you have
more than one web site running.

You actually asked about "localhost". Why are you not doing this?

127.0.0.1 mark

Or for that matter, why not just use "http://localhost:8080" ?


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Dave Anderson [ Do, 27 September 2007 22:07 ] [ ID #1830697 ]

Re: Turn locahost into com

Right now the line looks like this:
192.168.1.75 mark

but http://mark:8080/ does not work.


"Brian Staff" <brianstaff AT [NoSpam]cox DOT net> wrote in message
news:VA.0000033e.4d5dc44b [at] bstaffw2k.jda.corp.local...
> Did you try http://mark:8080/
>
> Brian
>
> In article <#F4s7sTAIHA.4592 [at] TK2MSFTNGP03.phx.gbl>, Mark Goldin wrote:
>> From: "Mark Goldin" <mgoldin [at] ufandd.com>
>> Subject: Re: Turn locahost into com
>> Date: Thu, 27 Sep 2007 14:18:41 -0500
>> Newsgroups: microsoft.public.inetserver.asp.general
>>
>>
>> 192.168.1.75 mark #PRE #DOM:testing
>> I am trying to add this line.
>> But http://mark.testing:8080/ does not work while
>> http://192.168.1.75:8080/
>> works fine. What am I doing wrong?
>>
>>
>> "Dave Anderson" <NPQRWPDWZGSP [at] spammotel.com> wrote in message
>> news:OHoKHjTAIHA.5328 [at] TK2MSFTNGP05.phx.gbl...
>> > "Mark Goldin" wrote:
>> >> Is it possible (for testing purposes) turn a locahost into
>> >> somename.com?
>> >
>> > If you add an entry to your hosts file, sure.
>> >
>> > Start
>> > Run
>> > notepad.exe c:\windows\system32\drivers\etc\hosts
>> >
>> >
>> >
>> > --
>> > Dave Anderson
>> >
>> > Unsolicited commercial email will be read at a cost of $500 per
>> > message.
>> > Use of this email address implies consent to these terms.
>>
>
>
Mark Goldin [ Do, 27 September 2007 21:54 ] [ ID #1830698 ]

Re: Turn locahost into com

Neat stuff, Mr. Anderson.

I tried it out (just because it was there):

127.0.0.1 localhost
127.0.0.1 yahoo.com

but yahoo.com still went to Yahoo's site - not my localhost.

Is a reboot required?

On the other hand, I replaced all of Windows default files in
"C:\Inetpub\wwwroot" with a web page I had created some time ago. Now, all I
need to do to test the page is browse over to http://localhost.

Learning new stuff is always fun.

"Dave Anderson" wrote:
>> Is it possible (for testing purposes) turn a locahost into somename.com?
>
> If you add an entry to your hosts file, sure.
>
> Start
> Run
> notepad.exe c:\windows\system32\drivers\etc\hosts
>
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message.
> Use of this email address implies consent to these terms.
jp2code [ Do, 27 September 2007 22:28 ] [ ID #1830699 ]

Re: Turn locahost into com

<ensure that the host headers are accounted
Not sure how to do that.

"Dave Anderson" <NPQRWPDWZGSP [at] spammotel.com> wrote in message
news:%23MFDOIUAIHA.4612 [at] TK2MSFTNGP03.phx.gbl...
> "Mark Goldin" wrote:
>> 192.168.1.75 mark #PRE #DOM:testing
>> I am trying to add this line.
>> But http://mark.testing:8080/ does not work while
>> http://192.168.1.75:8080/ works fine. What am I doing wrong?
>
> In the IIS console, check the [Advanced...] web site identification
> properties to ensure that the host headers are accounted for if you have
> more than one web site running.
>
> You actually asked about "localhost". Why are you not doing this?
>
> 127.0.0.1 mark
>
> Or for that matter, why not just use "http://localhost:8080" ?
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message.
> Use of this email address implies consent to these terms.
Mark Goldin [ Do, 27 September 2007 22:32 ] [ ID #1830700 ]

Re: Turn locahost into com

> Right now the line looks like this:
> 192.168.1.75 mark
>
> but http://mark:8080/ does not work.

Well, I just entered this line:
127.0.0.1 brian

and http://brian works for me

Brian
Brian Staff [ Do, 27 September 2007 22:58 ] [ ID #1830701 ]

Re: Turn locahost into com

"jp2code" wrote:
> I tried it out (just because it was there):
>
> 127.0.0.1 localhost
> 127.0.0.1 yahoo.com
>
> but yahoo.com still went to Yahoo's site - not my localhost.

I just tried it on my machine and got the localhost -- on IE only. And IE
seems to cache the IP in a way that requires a restart (of IE, not of
Windows) if you make the change.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Dave Anderson [ Do, 27 September 2007 23:14 ] [ ID #1830703 ]

Re: Turn locahost into com

What file are you changing?

"Brian Staff" <brianstaff AT [NoSpam]cox DOT net> wrote in message
news:VA.0000033f.4da339b9 [at] bstaffw2k.jda.corp.local...
>> Right now the line looks like this:
>> 192.168.1.75 mark
>>
>> but http://mark:8080/ does not work.
>
> Well, I just entered this line:
> 127.0.0.1 brian
>
> and http://brian works for me
>
> Brian
>
Mark Goldin [ Do, 27 September 2007 23:26 ] [ ID #1830704 ]

Re: Turn locahost into com

Mark,

If you have IIS installed on your machine (most do, these days), then you
could copy your website to the localhost root folder, which on your PC is:

C:\Inetpub\wwwroot

Once that is done, click on http://localhost/ and the website you have
copied into the wwwroot folder should launch.

As Mr. Anderson pointed out in a reply to me below, this will only work with
Internet Explorer (6 and up, I think).

If your website pages include ASP, you will need to open the IIS console
(under Admin Tools) and set the permissions for the folders that contain the
ASP files.

Hope that helps!

"Mark Goldin" wrote:
> Not sure how to do that.
>
> "Dave Anderson" wrote:
>> In the IIS console, check the [Advanced...] web site identification
>> properties to ensure that the host headers are accounted for if you have
>> more than one web site running.
>>
>> You actually asked about "localhost". Why are you not doing this?
>>
>> 127.0.0.1 mark
>>
>> Or for that matter, why not just use "http://localhost:8080" ?
>> --
>> Dave Anderson
jp2code [ Fr, 28 September 2007 16:35 ] [ ID #1831707 ]

Re: Turn locahost into com

Mark,

You want to edit the "hosts" text file, as described by Mr. Anderson
earlier:

> > Start
> > Run
> > notepad.exe c:\windows\system32\drivers\etc\hosts

In other words:

Click the "Run..." command under your Start button.
Next, type in "notepad.exe c:\windows\system32\drivers\etc\hosts," in the
Run dialog box.
This will open Notepad with the "hosts" file.

Make sense?

"Mark Goldin" wrote:
> What file are you changing?
>
> "Brian Staff" wrote:
>>> Right now the line looks like this:
>>> 192.168.1.75 mark
>>>
>>> but http://mark:8080/ does not work.
>>
>> Well, I just entered this line:
>> 127.0.0.1 brian
>>
>> and http://brian works for me
>>
>> Brian
>>
>
>
jp2code [ Fr, 28 September 2007 16:39 ] [ ID #1831708 ]

Re: Turn locahost into com

Dave Anderson wrote:
> "jp2code" wrote:
>> I tried it out (just because it was there):
>>
>> 127.0.0.1 localhost
>> 127.0.0.1 yahoo.com
>>
>> but yahoo.com still went to Yahoo's site - not my localhost.
>
> I just tried it on my machine and got the localhost -- on IE only. And
> IE seems to cache the IP in a way that requires a restart (of IE, not of
> Windows) if you make the change.

Maybe

ipconfig /flushdns

would also work.
Peter Smith [ Mo, 08 Oktober 2007 12:30 ] [ ID #1839333 ]

Re: Turn locahost into com

"Peter Smith" wrote:
>> IE seems to cache the IP in a way that requires a restart (of IE, not of
>> Windows) if you make the change.
>
> Maybe
>
> ipconfig /flushdns
>
> would also work.

Maybe, but I doubt it. As I said, restarting IE is sufficient, so I surmise
that IE never looks again.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Dave Anderson [ Mo, 08 Oktober 2007 18:45 ] [ ID #1839341 ]
Webserver » microsoft.public.inetserver.asp.general » Turn locahost into com

Vorheriges Thema: how to show more than column value in combo box
Nächstes Thema: Page continuously refreshs