Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2013
    Location
    Orange County, CA
    Posts
    27
    Plugin Contributions
    0

    Default Redirects for "page not found"

    I did a search in the forums for "redirects" and "page not found" but couldn't find an answer (at least one I understood)

    A lot of us noobies are constantly changing pages as we are getting the feel of Zen Cart. Some of the older pages have already been ranked with google, which is great but the viewer is directed to my website page with a message saying "that page was not found". I'm curious to know if there is anyway you can direct outdated pages to your home page. So if the url is mywebsite.com//index.php?main_page=index&cPath=22 and that page is no longer a valid page in my website, I'd like to redirect it back to the home page.

    I know eventually the problem will be solved when Google re-index's my site but I was curious if this can be done (without a programming degree from M.I.T)

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Redirects for "page not found"

    See your admin's Configuration->My Store->Missing Page Check. Set the value to 'On' (redirect to home page).

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Redirects for "page not found"

    Also, Google "zen cart custom 404 page"

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

    Default Re: Redirects for "page not found"

    Quote Originally Posted by ocmusic View Post
    constantly changing pages
    Not sure exactly what you mean by "changing pages". By "pages", are you actually talking about categories? That's somewhat implied in the rest of your post, but it's a bit unclear, for reasons I will explain:

    Quote Originally Posted by ocmusic View Post
    Some of the older pages have already been ranked with google, which is great but the viewer is directed to my website page with a message saying "that page was not found".
    The proper 'page not found' message only occurs when someone clicks a link to a page that actually doesn't exist. Such as index.php?main_page=fred or no_page_here.php

    It does *not* appear when someone clicks a link to a removed category. If you've removed a category, the visitor sees a simple "No products in this category" message, and the search engine is also told in the background to remove this page from their index so they don't keep providing it in search results.

    Quote Originally Posted by ocmusic View Post
    I'm curious to know if there is anyway you can direct outdated pages to your home page. So if the url is mywebsite.com//index.php?main_page=index&cPath=22 and that page is no longer a valid page in my website, I'd like to redirect it back to the home page.
    But, if you really want to blindly push your visitors to the home page instead of telling them that the link they clicked (or more importantly that maybe they had bookmarked) is invalid, you could make the following coding change to /includes/modules/pages/index/header_php.php around line 55:
    Code:
    if ($category_depth == 'products' && $listing->RecordCount() == 0) /* $robotsNoIndex = true; */ zen_redirect(zen_href_linkFILENAME_DEFAULT));
    .

    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.

 

 

Similar Threads

  1. v150 "CSS Button Addon" causing "Page Not Found" Error ...
    By Rony in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 30 Apr 2012, 05:37 AM
  2. 302 Found: "Document has moved" on redirects
    By asnell910 in forum General Questions
    Replies: 1
    Last Post: 23 Dec 2010, 07:55 AM
  3. Clicking "Add to Cart" on a review delivers "product not found"
    By bifficus in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Nov 2007, 10:11 PM
  4. Zen Cart's "Page Not Found" doesn't come up for me...
    By flipjargendy in forum General Questions
    Replies: 7
    Last Post: 14 Aug 2007, 12:05 AM
  5. Login, but "page cannot be found" unless "Refresh"
    By simonmade in forum General Questions
    Replies: 3
    Last Post: 2 Oct 2006, 07:04 PM

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