hosts file does not support url to url syntax, only url to ip.
Setup local web server (Apache would be fine).
Use host file to point URL to local IP.
You can also go one step further to install PHP and redirect URL using index.php.
3 years ago