We've noticed that products marked as 'private' are issued a 302 redirect. We'd like to change that to be a 301 redirect.
Is it possible to change how redirects are fired based on product visibility?
Gold R8 Private Products HTTP 302
Gold R8 Private Products HTTP 302
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Gold R8 Private Products HTTP 302
I think this is default behavior of ASP.NET Response.Redirect function. You can try using Response.RedirectPermanent. If you edit Website/Product.aspx.cs file and locate following code.
You can update it like
That should do the trick.
Code: Select all
if ((_product.Visibility == CatalogVisibility.Private) &&
(!AbleContext.Current.User.IsInRole(Role.CatalogAdminRoles)))
{
Response.Redirect(NavigationHelper.GetHomeUrl());
}
Code: Select all
if ((_product.Visibility == CatalogVisibility.Private) &&
(!AbleContext.Current.User.IsInRole(Role.CatalogAdminRoles)))
{
Response.RedirectPermanent(NavigationHelper.GetHomeUrl());
}