简体   繁体   中英

Force IP in the url?

Is there a standard way to force the browser to resolve a certain domain name to a specified IP?

Fictive example: http://www.notregistered.com=192.168.0.1:8080/homepage.html

I'd need that to show (work in progress) websites to end users before the domain name has been set to the right server.

If not is there a way with FireFox & Chrome?

On Linux, you can edit your /etc/hosts file to force a host name to map to a specific IP address, as in:

127.0.0.1  www.example.com

Similar information is available on the web for both Windows and Linux.

Juste 使用 192.168.0.1:8080/homepage.html 并且它会工作你可以在http://216.58.208.67/访问谷歌例如

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