简体   繁体   中英

How to point an IP address to domain name

I have an IP address of a server ( http://185.207.xxx.xxx/test2.php ) and I want to open this as ( http://domainname.com/test2.php ) from my system.

when i edited my hosts file in /etc/hosts with following entry

 185.207.xxx.xxx domainname.com 

but it is showing below error:

  Error: The requested URL can not be retrieved 

Can anyone help me in resolving this?

Try this , 185.207.xxx.xxx domainname

Not need to add .com and the hosts file must be edited as the Administrator or root user. In Windows, remember to open your text editor as the Administrator user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM