While attemtping to debug some old website, I've been banging my head against a rather ridiculous wall.
In my HOSTS file, I have
127.0.0.1 local.dev.site.tld
When I navigate it in my browser, Request.Url.Host
keeps being localhost
instead of local.dev.site.tld
This is needed to determine things like language, like if .tld
is .de == Germany
or .dk == Denmark
. Unfortunately I cannot change all the calls to Request.Url.Host
. But it should just work, shouldn't it..?
Some say it's the browser's "fault", cause it'd have localhost
in the host-header, but Fiddler tells me that said header is local.dev.site.tld
.
My google-foo isn't very strong, so forgive me if I've missed some obvious solution or SO post.
So, how do I make the right hostname appear in Request.Url.Host
?