Page 1 of 1

Page Not Found 404 Error Server Error when Deleting Products

Posted: Fri Mar 21, 2008 7:35 am
by DonAshby
Hi Everyone,

Has anyone else seen that product pages that are deleted are not being handled properly as a 404 Page Not Found Error?

If you delete a product from your site (or change the title of that product), and then try to go to that old URL, you will get this ominous error page:

http://www.goinginstyle.com/gis/Victori ... 6C126.aspx

This is a product that is no longer on the web site but is still in the Google Index. Products that are deleted can remain in the Google Index for weeks - this is a big deal to us as we want people to get to our site from ALL links that come from Google - the Server Error Message will bounce them off our site .... so we would really prefer if AC sent people who get 404 Page Not Found Errors to this custom page instead:

http://www.goinginstyle.com/gis/index.asp

Should this be changed in AC or can we insert change the code so that Page Not Found errors send people to a proper message - this is how Amazon does it.

http://www.amazon.com/gp/errors/system-error.html

Thanks, Don :?:

PS. Should this go into the bug report?

Posted: Fri Mar 21, 2008 7:56 am
by Will
In the web.config file, the customErrors tag is set to off. If you set it to on you can tell it which file to redirect to for which error:

Code: Select all

<customErrors mode="On" defaultRedirect="~/errors/generic.aspx">
<error statusCode="404" redirect="~/errors/404.aspx" />
<error statusCode="500" redirect="~/errors/500.aspx" />
</customErrors>

Posted: Tue Mar 25, 2008 2:27 pm
by AbleMods
I modified the BuyProductDialog control and the CategoryGrid controls so that they redirect to customized search pages depending on the (failed) entry point.

That way, regular content pages still 404 to the home page while product-specific or category-specific (failed) landings can give the user a nice screen to know what happened and landing-specific search choices.

Then I added two custom store fields to hold the redirect URLS and modified the store settings page. If I ever want to change the destinations to new URLs, I just change it in Store Settings and my whole site updates appropriately.