string language = Request.UserLanguages[0].ToString();
String currentURL = Request.Url.AbsoluteUri;
string dd = "http://localhost:3879/Index.aspx";
if (currentURL == dd.ToString())
{
if (language == "zh-cn" || language == "zh")
{
Response.Redirect("http://cn.123.com");
}
else
{
Response.Redirect("http://www.234.com");
}
}string dd = "http://localhost:3879/Index.aspx";
我在地址栏输入http://localhost:3879/Index.aspx 可以判断 可以进入到cn.123.com为什么string dd = "http://234.com";
我在地址栏输入http://234.com 就不会判断了 这是为什么呀?
String currentURL = Request.Url.AbsoluteUri;
string dd = "http://localhost:3879/Index.aspx";
if (currentURL == dd.ToString())
{
if (language == "zh-cn" || language == "zh")
{
Response.Redirect("http://cn.123.com");
}
else
{
Response.Redirect("http://www.234.com");
}
}string dd = "http://localhost:3879/Index.aspx";
我在地址栏输入http://localhost:3879/Index.aspx 可以判断 可以进入到cn.123.com为什么string dd = "http://234.com";
我在地址栏输入http://234.com 就不会判断了 这是为什么呀?
调试看看
第二个应该是http://234.com/default.aspx
别人打开网站肯定不会输入http://234.com/default.aspx不是只要判断用户在地址栏输入的和我在程序里定义的相等就好了吗?这样的话不是就可以判断出来了吗?
可是为什么不会判断?