Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Adding an image for a custom 404 page

    I'm trying to add an image to my template's page_not_found.php page. All I want to do is add a simple <img> tag to this:

    PHP Code:
    <?php 

    header
    ("HTTP/1.1 301 Moved Permanently");
    header("Location: index.php?main_page=page_not_found");


    ?>
    I edited the .htaccess page to point to this page already.

    Thanks

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Adding an image for a custom 404 page

    Quote Originally Posted by thebigkick View Post
    I'm trying to add an image to my template's page_not_found.php page. All I want to do is add a simple <img> tag to this:
    PHP Code:
    <?php 

    header
    ("HTTP/1.1 301 Moved Permanently");
    header("Location: index.php?main_page=page_not_found");
    ?>
    Can't be done. This 'page' is never displayed. Assuming you have zencart set to display the 'page not found' page (My Store ->missing page check) then the file you'll need to edit woud be /includes/modules/pages/page_not_found/header_php.php

    Quote Originally Posted by thebigkick View Post
    I edited the .htaccess page to point to this page already.
    I'm not sure why you needed to do this?

    Cheers
    Rod

  3. #3
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: Adding an image for a custom 404 page

    Ok. I definitely need direction on this. All I'm trying to do is have an image show up that indicates a 404 error. And have that image link to the home page.

    Would I be wrong in saying that there are two (2) 404 pages; Zen cart's internal 404 and an external 404?

    i was originally following this: http://www.zen-cart.com/showthread.p...ustom+404+page
    Last edited by thebigkick; 22 May 2012 at 05:29 PM.

  4. #4
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: Adding an image for a custom 404 page

    So I edited define_page_not_found.php in the Define Pages Editor under the Admin. Worked perfectly. (Another case of making things more complicated than it needs to be.)

    Just interested in editing the external 404 page that the server throws up. I guess this isn't ZC specific but I'll post the solution when I find it.

  5. #5
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: Adding an image for a custom 404 page


  6. #6
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: Adding an image for a custom 404 page

    Ok here is what I did. Pretty simple.

    1) Created and customized notfound.html, and placed it in the same directory as .htaccess.
    2) Went to .htaccess and entered

    Code:
    ErrorDocument 404 /notfound.html
    3) Saved and uploaded both to the server.

    Custom Apache server 404 page.

 

 

Similar Threads

  1. 404 Page Not Found on Custom PHP Developed Page
    By mariasims in forum General Questions
    Replies: 1
    Last Post: 13 May 2010, 09:27 AM
  2. Custom 404 page
    By MoooNDawG in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Mar 2010, 05:34 PM
  3. custom 404 page not found
    By abs007 in forum Basic Configuration
    Replies: 3
    Last Post: 19 Mar 2009, 05:26 PM
  4. Page Not Found - Custom 404 Error Page
    By Zoramilea in forum General Questions
    Replies: 4
    Last Post: 15 Sep 2008, 11:39 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