Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Page Not Found redirect not working for some of my deleted products

    I have a different sort of problem - all mistyped URL searches to my site show the page_not_found as they are supposed to and nicely returning 404 Not Found headers. Also products which have been removed from the catalog and redirected via .htaccess return either the 410 or 301 headers as needed.

    The problem I couldn't find solution for is with the pages for products which have been removed from catalog but I don't want to redirect them with 301 or 410 if this can be helped. I imagine that since the deleted products don't exist anymore, typing their former URL would generate standard 404 Not Found header and display the page_not found without the need of redirecting them one by one.

    Example 1 - accidental URL typed/mistyped returns 404 response:
    http://www.all4coffee.com/xxxx

    Example 2 - redirected in .htaccess, old directory returns 410:
    http://www.all4coffee.com/gifts

    BUT

    Example 3 - removed product URL and not redirected in .htaccess (other than the line: ErrorDocument 404 /index.php?main_page=page_not_found) hangs in Browser and displays "Cannot display in Browser" message. Server header check shows however 200 OK. I checked database and confirmed that the product is not there anymore:
    http://www.all4coffee.com/monin-banana-p-109.html

    I don't understand why. Logically since the URL for the deleted product doesn't exist, the result should be 404 Not Found. Where am I wrong? I'm using ZenCart 1.37 and would appreciate your help. Thanks.
    Last edited by all4coffee; 15 Aug 2010 at 05:06 AM.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Page Not Found redirect not working for some of my deleted products

    Try asking whoever wrote your SEO addon.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Re: Page Not Found redirect not working for some of my deleted products

    Quote Originally Posted by Kim View Post
    Try asking whoever wrote your SEO addon.
    This is Ultimate SEO. I dids turn it off and the same problem continued. I also cleared browser's cache, renewed ipconfig, flushed DNS. It seems like removed products are kept somewhere in "memory" not generating 404 error but 200 header response. Any suggestions? Please...

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Page Not Found redirect not working for some of my deleted products

    Several improvements were made in v1.3.9 to cause not-found products to trigger a 404 header response. I recommend upgrading.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Re: Page Not Found redirect not working for some of my deleted products

    Quote Originally Posted by DrByte View Post
    Several improvements were made in v1.3.9 to cause not-found products to trigger a 404 header response. I recommend upgrading.
    I would rather not (my store works great and was so much customized that it would be a huge task). Is there any type of fix I could use to do it with v1.3.7?

  6. #6
    Join Date
    Jul 2007
    Posts
    154
    Plugin Contributions
    0

    Default Re: Page Not Found redirect not working for some of my deleted products

    Quote Originally Posted by all4coffee View Post
    I would rather not (my store works great and was so much customized that it would be a huge task). Is there any type of fix I could use to do it with v1.3.7?
    All it needed was a header code on top of the tpl_product_info_noproduct.php

    Code:
    header("HTTP/1.1 410 Gone");
    I chose to generate 410 Gone code vs. 404 Not Found since it seems more appropriate for the products which have been permanently removed from the catalog and which don't need to be redirected in .htaccess. Thanks for your help.

 

 

Similar Threads

  1. deleted products not going to page not found
    By kburner in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Jul 2011, 05:36 PM
  2. login redirect to 'page not found'
    By bigbadboy in forum General Questions
    Replies: 1
    Last Post: 6 Mar 2009, 12:40 PM
  3. Page Not Found override not working for me
    By Spinner in forum Templates, Stylesheets, Page Layout
    Replies: 42
    Last Post: 13 Jan 2009, 08:24 PM
  4. Page Not Found is not working for me in the new 1.3.7 release
    By immersive in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 22 Feb 2007, 04:41 PM
  5. 404 Not Found Page Not Found not working!
    By NamSingh in forum Basic Configuration
    Replies: 0
    Last Post: 15 Oct 2006, 10:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR