Jump to content

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!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.