我试图重定向到https如何重定向到https并添加www。在链路
前面我用下面的代码在Global.asax中
protected void Application_BeginRequest()
{
if (!Context.Request.IsSecureConnection)
Response.Redirect(Context.Request.Url.ToString().Replace("http:", "https:"));
}
但我的问题是,我必须在链接的前面加上www, 即mywesite.se并重定向到https后,它像https://mywebsite.se但我希望它像https://www.mywebsite.se
可以哟给我一个例子吗? –
[组合URI和路径]的可能重复(http://stackoverflow.com/questions/679171/combining-uris-and-paths) – Andrea