0

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?

1 Answer 1

1

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.

4
  • I tried with domainname/test2.php and domainname.com/test2.php both but showing ` Error: The requested URL can not be retrieved`. I have added same as 185.207.xxx.xxx domainname in /etc/hosts file. What i need to do ?
    – BornCoder
    Commented Jul 21, 2017 at 11:48
  • Is this IP , hosted with another alias name in the hosts file? Commented Jul 21, 2017 at 11:53
  • which server you are using? Commented Jul 21, 2017 at 11:57
  • i am using nginix dedicated server. I have tried in linux and windows both in my local machine
    – BornCoder
    Commented Jul 21, 2017 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.