just tried to add a new entry to my windows hosts file so that instead of using this:
to launch my wordpress site, I can just do something like this:
This is what my c:\Windows\System32\Drivers\etc\hosts file looks like:
127.0.0.1::8085 widget.local
localhost::8085 widget.localRebooted my machine after making the change. But widget.local doesn't work.
I also tried this:
127.0.0.1:8085 widget.local
localhost:8085 widget.localShould I be able to do this? If so, can you tell me what I've done wrong?
Thanks.
11 Answer
Should I be able to do this?
No. Host files do not contain port numbers.
The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. Each field is separated by white space – tabs are often preferred for historical reasons, but spaces are also used. Comment lines may be included; they are indicated by an octothorpe (#) in the first position of such lines.
Source: hosts (file) - Wikipedia
2