If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / All Other Contributions/Addons / Does Anyone has the Custom 404 Error Mod.?

Does Anyone has the Custom 404 Error Mod.?

Locked

Started by stenrique on 3 Jan 2007, 4:44 PM · Views: 2,320

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
3 Jan 2007, 4:44 PM
#1
stenrique avatar

stenrique

Zen Follower

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

Post #1 by stenrique

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.

3 Jan 2007, 5:21 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

It's now built-in to Zen Cart v1.3

.
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.

3 Jan 2007, 6:47 PM
#3
stenrique avatar

stenrique

Zen Follower

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

Post #3 by stenrique

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 https://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.

3 Jan 2007, 11:07 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

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.

.
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.

4 Jan 2007, 1:34 AM
#5
stenrique avatar

stenrique

Zen Follower

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

Post #5 by stenrique

Thanks once again.

I'm using ```
getenv ("REQUEST_URI")

4 Jan 2007, 4:48 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

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.

.
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.

4 Jan 2007, 7:45 PM
#7
stenrique avatar

stenrique

Zen Follower

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

Post #7 by stenrique

I suppose i did. :D
Thanks DrByte.