Open GoogleCodeExporter opened 9 years ago
This is easily enough accomplished by editing the following with your sites - a
default host if you will...:
under host and hostprofile in kickpage.cs ->
get {
if (this.Request.Url.ToString().IndexOf("newurlunknown") > 0)
{
Uri nol = new Uri("http://urltohit.com");
return HostHelper.GetHostName(nol);
}
else
{
return HostHelper.GetHostName(this.Request.Url);
}
}
}
hostprofile:
get
{
if (this._hostProfile == null)
{
if (this.Request.Url.ToString().IndexOf("urlunknown") > 0)
{
Uri nol = new Uri("http://urltohit/");
this._hostProfile =
HostCache.GetHost(HostHelper.GetHostAndPort(nol));
}
else
{
this._hostProfile =
HostCache.GetHost(HostHelper.GetHostAndPort(this.Request.Url));
}
}
return this._hostProfile;
}
I have successfully used this with multiple domains all pointing to one live.
So in
the case of localhost you would use if !localhost hit localhost. Simple as
that.
I guess it ultimately depends on if you want your localhost db to be the same
as your
remote db for testing/use. I myself simply add the domains I need it use to the
above and have them point w/e I want.
Original comment by DustinBr...@gmail.com
on 9 Jan 2008 at 5:38
Original issue reported on code.google.com by
yesthatm...@gmail.com
on 10 Dec 2007 at 4:17