Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows: How to use hosts file with path?

Tags:

hosts-file

This works:

127.0.0.1       www.somesite.com

But not this:

127.0.0.1/somepath/www       www.mysite.com

What am I doing wrong? Is it possible to map a full path like this? If not, what is the easiest way to accomplish what I want to do here?

like image 344
coderama Avatar asked Oct 27 '25 05:10

coderama


1 Answers

The simple answer is that you can't use the hosts file to redirect to specific URLs. It can only be used to map hostnames to IP addresses.

like image 172
NPE Avatar answered Oct 30 '25 12:10

NPE



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!