Jump to content

[SOLVED] Specifying a Host Location


Jen-a-Bean

Recommended Posts

I can access my desktop server from my laptop using http://192.168.1.70:8080, but I'd like to be able to just type in http://computerName instead.  As I understand I have to edit the hosts file on the computer (c:\system32\drivers\ect\hosts).  This is what I've added:

 

192.168.1.70:8080 computerName

 

It doesn't seem to work?

 

Also if I try the same process on a system running Vista I can't even save modifications to the hosts file.  I even tried saving the file to the desktop, and then copying to to the proper folder.  Since it saves as a TXT file it doesn't overwrite the file in the proper directory.  Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/180803-solved-specifying-a-host-location/
Share on other sites

I believe I have it working now!

 

When I ran Notepad as an administrator it allowed me to save the file to the location I needed.  I'll never get used to having to tell the computer I'm running a program as an admin after being logged into an admin account. ;D

 

The location of the file should actually be c:\windows\system32... as Rajiv noted.  I neglected the windows part when typing the path in my original message.

 

Once I removed the port number from the hosts file it was able to redirect properly.

 

Thanks again for the help all!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.