Forums / All Other Contributions/Addons / Does Anyone has the Custom 404 Error Mod.?

Does Anyone has the Custom 404 Error Mod.?

Locked
Results 1 to 7 of 7
This thread is locked. New replies are disabled.
03 Jan 2007, 16:44
#1
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Does Anyone has the Custom 404 Error Mod.?

Gooday,

Does anyone has or know where I can download the custom 404 error mod. that was mentioned in one of the archived articles? TIA.
03 Jan 2007, 17:21
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Does Anyone has the Custom 404 Error Mod.?

It's now built-in to Zen Cart v1.3
03 Jan 2007, 18:47
#3
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Does Anyone has the Custom 404 Error Mod.?

Thanks for the info. DrBtye,

I tried testing it by keying in a non-existent file at the URL and the page displayed was plain white with the following text:

Not Found
The requested URL /testing.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.37 Server at www.example.com Port 80


I was expecting to see the "No Found..." text displayed within the site's layout. Is there something I miss?
TIA.
03 Jan 2007, 23:07
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Does Anyone has the Custom 404 Error Mod.?

You will still have to adjust your own .htaccess file to trigger the Zen Cart not-found page.
An example may be found in the /extras folder as a reference point.
04 Jan 2007, 01:34
#5
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Does Anyone has the Custom 404 Error Mod.?

Thanks once again.

I'm using
getenv ("REQUEST_URI")
to capture URL that generated the 404 error but all it captured thus far was:
/index.php?main_page=page_not_found
Would you mind letting me know which PHP pre-defined variable should I utilize instead? TIA.
04 Jan 2007, 04:48
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Does Anyone has the Custom 404 Error Mod.?

You are making it way too complicated.

Requested:
You are wanting to have a customized 404 page that points to your Zen Cart page-not-found area.

Answer:
Follow the instructions in the example .htaccess file in the /extras folder:
/extras/htaccess_for_page_not_found_redirects.htaccess

The file says this:
# replace www.MYSITE.COM with your website address.
# be sure to add any extra paths required to locate the index.php
# then relocate this file to the root of your store's folders, and rename it as .htaccess

ErrorDocument 404 http://www.MYSITE.COM/index.php?main_page=page_not_found


So ... following those instructions, you would:
1. replace MYSITE.COM with the URL of YOUR website
2. rename the file to .htaccess
3. move the file to the root of your site.

It's that easy.

Now, whenever someone hits a non-existent page such as
http://www.WHATEVERYOURSITEIS.com/badpagename ,
they will be redirected to your page_not_found page within your Zen Cart site.
04 Jan 2007, 19:45
#7
stenrique avatar

stenrique

Zen Follower

Join Date:
Apr 2005
Posts:
355
Plugin Contributions:
0

Re: Does Anyone has the Custom 404 Error Mod.?

I suppose i did. :D
Thanks DrByte.