关于dtcms一篇文章多个链接的问题
摘要:dtcms一个文章有多个链接,怎么解决关于dtcms一篇文章多个连接解决方案如下不再为此带来的seo负面影响而担心啦
dtcms一个文章有多个链接,怎么解决
关于dtcms一篇文章多个连接解决方案如下
不再为此带来的seo负面影响而担心啦
int id = DTRequest.GetQueryInt("id"); int category_id = DTRequest.GetQueryInt("category_id"); if (category_id != 0 || id != 0) { int index_ = requestPath.IndexOf('_'); string channel = requestPath.Substring(0, index_); channel = channel.TrimStart('/'); int channelId = 0; if (category_id != 0) { if (new BLL.article_category().Exists(category_id)) { channelId = new BLL.article_category().GetModel(category_id).channel_id; } else { HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode(config.webclosereason))); return new Model.channel_site(); } } else { if (new BLL.article().Exists(id)) { channelId = new BLL.article().GetModel(id).channel_id; } else { HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode(config.webclosereason))); return new Model.channel_site(); } } string channelName = new BLL.channel().GetModel(channelId).name; if (channelName != channel) { HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode(config.webclosereason))); return new Model.channel_site(); } }