复制代码代码如下:
protected void Application_BeginRequest(object sender, EventArgs e)
{
string strUrl = Request.Url.ToString().Trim().ToLower();
if (strUrl.Contains("http://zzvips.com"))
{
Response.RedirectPermanent(strUrl.Replace("http://zzvips.com", "//www.zzvips.com"));
}
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
string strUrl = Request.Url.ToString().Trim().ToLower();
if (strUrl.Contains("http://zzvips.com"))
{
Response.RedirectPermanent(strUrl.Replace("http://zzvips.com", "//www.zzvips.com"));
}
}
实现如:http://zzvips.com/about 重定向到 //www.zzvips.com/about
相关文章
猜你喜欢
- ASP.NET自助建站系统中如何实现多语言支持? 2025-06-10
- 64M VPS建站:如何选择最适合的网站建设平台? 2025-06-10
- ASP.NET本地开发时常见的配置错误及解决方法? 2025-06-10
- ASP.NET自助建站系统的数据库备份与恢复操作指南 2025-06-10
- 个人网站服务器域名解析设置指南:从购买到绑定全流程 2025-06-10