'Redirect https://wikipedia.org to go to my local-ip/localhost/127.0.0.1

I wish to redirect request from my machine to https://wikipedia.org, so it goes to a local server instead.

Say I have a server running on localhost:3000 // 127.0.0.1:3000. If I go to https://wikipedia.org, I would like it to go to the local server.

Can this be done?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source