コード例 #1
0
 private void URLRedirect()
 {
     pageType = "e";
     if (Request["recurl"] == null)
     { //If this is null means that the redirect haven't started
         if (Request["id"] != null)
         {
             pageId = Request["id"].ToString();
             Cleaner c = new Cleaner();
             pageName = c.cleanURL(pageName);
             pageName = pageName.Replace(":", "");
             if (Request["TypeGen"] != null)
             {
                 if (Request["am"] != null && Request["asm"] != null)
                 {
                     Response.Redirect(pageName + "-r-" + pageType + "-" + pageId + ".g" + Request["am"].ToString() + "_" + Request["asm"].ToString() + "html");
                 }
                 else
                 {
                     Response.Redirect(pageName + "-r-" + pageType + "-" + pageId + ".ghtml");
                 }
             }
             else
             {
                 if (Request["am"] != null && Request["asm"] != null)
                 {
                     Response.Redirect(pageName + "--" + pageType + "-" + pageId + ".g" + Request["am"].ToString() + "_" + Request["asm"].ToString() + "html");
                 }
                 else
                 {
                     Response.Redirect(pageName + "--" + pageType + "-" + pageId + ".ghtml");
                 }
             }
             Response.Redirect(pageName + "--" + pageType + "-" + pageId + ".ghtml");
         }
         else
         { //If this is null better to redirect to the homepage.
             Response.Redirect("home.aspx");
         }
     }
 }
コード例 #2
0
    private void URLRedirect()
    {
        if (Request["recurl"] == null)
        { //If this is null means that the redirect haven't started
            string op1 = "";
            if (Request["findopt1"] != null)
            {
                op1 = Request["findopt1"].ToString();
            }
            else
            {
                op1 = "";
            }

            string op2 = "";
            if (Request["findopt2"] != null)
            {
                op2 = Request["findopt2"].ToString();
            }
            else
            {
                op2 = "";
            }

            string op3 = "";
            if (Request["findopt3"] != null)
            {
                op3 = Request["findopt3"].ToString();
            }
            else
            {
                op3 = "";
            }

            string op4 = "";
            if (Request["findopt4"] != null)
            {
                op4 = Request["findopt4"].ToString();
            }
            else
            {
                op4 = "";
            }

            string op5 = "";
            if (Request["findopt5"] != null)
            {
                op5 = Request["findopt5"].ToString();
            }
            else
            {
                op5 = "";
            }

            string txt = "";
            if (Request["txtadv"] != null)
            {
                txt = Request["txtadv"].ToString();
            }
            else
            {
                txt = "";
            }
            Cleaner c = new Cleaner();
            Response.Redirect("search.pagegroup-" + _pgg + "_page-" + _pg + "_textsearch-" + c.cleanURL(txt) + "_fopt-" + op1 + "_fopt-" + op2 + "_fopt-" + op3 + "_fopt-" + op4 + "_fopt-" + op5 + ".shtml");

        }
    }
コード例 #3
0
 private void URLRedirect()
 {
     if (Request["recurl"] == null)
     { //If this is null means that the redirect haven't started
         Cleaner c = new Cleaner();
         Response.Redirect(c.cleanURL(_title) + "--" + _TitleId + ".phtml");
     }
 }
コード例 #4
0
 private void URLRedirect()
 {
     if (Request["recurl"] == null)
     { //If this is null means that the redirect haven't started
         if (Request["LandingId"] != null)
         {
             Cleaner c = new Cleaner();
             pageName = c.cleanURL(pageName);
             Response.Redirect(pageName + "--" + Request["LandingId"].ToString()+".gxhtml");
         }
         else
         { //If this is null better to redirect to the homepage.
             Response.Redirect("home.aspx");
         }
     }
 }