Zen Cart Logo
Forums / Customization from the Admin / Custom "Page not Found" not showing

Custom "Page not Found" not showing

Locked

Views: 2,054

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
26 Aug 2009, 11:01 AM
#1
graphicali avatar

graphicali

New Zenner

Join Date:
Jun 2009
Posts:
7
Plugin Contributions:
0

Custom "Page not Found" not showing

Hi, I hope that someone can help me here. :smile:

I went into the Define Pages Editor and changed the text in the define_page_not_found.php file.

However, when I test it, the custom page doesn't show up. I have set the Missing Page Check in Configuration, My Store to go to the page not found file. I also tried setting it back to the default but that doesn't work either.

I am using Zen Cart 1.3.8a. The link I am testing is: http://www.doricdragons.co.uk/define_page_not_found.php

Thanks in advance for any help that you can give.

Alita

28 Aug 2009, 4:09 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Custom "Page not Found" not showing

Try using:
http://www.doricdragons.co.uk/index.php?main_page=page_not_found

You could also just enter something like:
main_page=iamnothere
main_page=junk
main_page=fred

as any page that isn't real will trigger that ...

4 Sep 2009, 8:40 AM
#3
graphicali avatar

graphicali

New Zenner

Join Date:
Jun 2009
Posts:
7
Plugin Contributions:
0

Re: Custom "Page not Found" not showing

Many thanks for that reply. That does indeed bring up the right page.

However, and this is what triggered me to look at a custom page, when I try an outdated link:

http://www.doricdragons.co.uk/dragons/dragons.html

I don't get the custom page, although dragons.html doesn't exist any more. There's probably something obvious that I'm not seeing!

Thanks again!

4 Sep 2009, 8:32 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Custom "Page not Found" not showing

Zen Cart can only control what is in the scope of the code ...

We cannot prevent a call to an HTML page ... just pages that are attempted to be called that do not exist from the
/index.php?main_page=

anything there Zen Cart can catch ...

You might try making a missing page of your own for other things on your site with your .htaccess file in your root using something like:

DiRectoryindex index.php default.php index.shtml index.html index.htm /missing.html
AddHandler server-parsed .shtml
AddHandler server-parsed .html
AddHandler server-parsed .htm

Then build a missing.html for your site with links to your site ...

There are a lot of options to manage this ... speak to your hosting provider for all of the options available to you ...

5 Sep 2009, 2:37 PM
#5
graphicali avatar

graphicali

New Zenner

Join Date:
Jun 2009
Posts:
7
Plugin Contributions:
0

Re: Custom "Page not Found" not showing

Thank you! You have been very helpful and made things much clearer. I will take your advice and get in touch with my hosting company and see what they have got available and also try making my own missing page file.

:smile:

5 Sep 2009, 2:54 PM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: Custom "Page not Found" not showing

Note: If the pages that do not exist anymore had important information and/or page rank that you want to transfer to your new pages you need to use 301 redirects and not 404s.

5 Sep 2009, 3:14 PM
#7
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Custom "Page not Found" not showing

I wonder whether adding this to your .htaccess file would work:

ErrorDocument 404 /index.php?main_page=page_not_found

6 Sep 2009, 11:18 AM
#8
graphicali avatar

graphicali

New Zenner

Join Date:
Jun 2009
Posts:
7
Plugin Contributions:
0

Re: Custom "Page not Found" not showing

Thank you everyone for your help. I will try the 301 redirect first as the page was quite important.

It is great to have support from you all, I'm familiar with basic html, but I'm definitely more of a designer than a programmer!

6 Sep 2009, 2:29 PM
#9
graphicali avatar

graphicali

New Zenner

Join Date:
Jun 2009
Posts:
7
Plugin Contributions:
0

Re: Custom "Page not Found" not showing

Just a quick update, I added to the .htaccess file the code that you recommended Steven300 and also put in a 301 redirect for a specific page. It is working fine now.

Thanks again!