redirect home page...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 13 años
hello, how would i auto redirect my home page from default.aspx to http://URL/Category/1-Apparel.aspx.  i can't seem to find the file i need to update.  thanks for your help!
Hace 13 años
rwaite wrote:
hello, how would i auto redirect my home page from default.aspx to http://URL/Category/1-Apparel.aspx.  i can't seem to find the file i need to update.  thanks for your help!


Go to Default.aspx.cs and replace the code in Page_Load with this:
protected void Page_Load(object sender, EventArgs e)
        {
            Response.Redirect(SEOHelper.GetCategoryUrl(1));

            if (!Page.IsPostBack)
            {
                BindData();
            }
        }


Although I'm not sure why you would want to do this. This will redirect your home page to category 1, which is what you have posted...

You will need to re-compile...

Oh, you'll need to put this in the using section:
using NopSolutions.NopCommerce.BusinessLogic.SEO;
Hace 13 años
Tks, Barry.  Do you know anyone who does some consulting on nopcommerce?  i am more of an IT guy, not a developer so this a bit greek to me.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.