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.
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.
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.
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:
I was expecting to see the "No Found..." text displayed within the site's layout. Is there something I miss?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
TIA.
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.
Thanks once again.
I'm usingto capture URL that generated the 404 error but all it captured thus far was:Code:getenv ("REQUEST_URI")Would you mind letting me know which PHP pre-defined variable should I utilize instead? TIA./index.php?main_page=page_not_found
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:So ... following those instructions, you would:Code:# 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
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.
I suppose i did.
Thanks DrByte.