How to route a URL to an IP over LAN

1zacster

Distinguished
Oct 8, 2012
221
1
18,685
I am learning more about networking and wanted to know how I would route a URL over lan to a html server. The way have the computer configured is it is running windows 7, and it has smoothwall running in a VM with the virtual NIC configured to act like a direct connection to the network. Would it be possible to have the "router" redirect to the html server (also virtual :D) and keep the same name in the url bar? So typing in "http://www.homeserver.com" will take me to that home server (but not outside people, that isn't my goal) and if I hit a link to another page within the site it would say "http://www.homeserver.com/subpage"?
 

t8024328

Honorable
Jan 13, 2014
7
0
10,510
hi,

- you cannot route an url but you route an ip.
- not html server but www server or webserver

To "route" an url, u need to setup an dns server and says 'homeserver.com' is 'this ip addr' (a A record).
then setup the DNS ip (in your ip configuration..in the client) to be the ip of this dns server.

or

you can play with the 'hosts' file (in your client PC) to map hostnames to IP addresses. (windows\system32\drivers\etc) as it act as a local dns server (let say)