日期:2014-05-17 浏览次数:20417 次
public class URLClass
{
private int flag301 = 0;//是否启动 301
private Page page301 = null;
private string strURL301 = string.Empty;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="fl">是否启动 301</param>
/// <param name="page">Page</param>
/// <param name="strURL">格式www.xxx.com</param>
public URLClass(int fl, Page page, string strURL)
{
flag301 = fl;
page301 = page;
strURL301 = strURL;
}
/// <summary>
/// 返回主页
/// </summary>
/// <param name="page"></param>
/// <param name="strURL"></param>
public void URL301()
{
//301重定向
if (flag301 == 1 && !page301.Request.Url.Host.Contains("www."))