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.
Views: 2,311
Zen Follower
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.
Sensei
It's now built-in to Zen Cart v1.3
Zen Follower
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.
Sensei
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 Follower
Thanks once again.
I'm using ```
getenv ("REQUEST_URI")
Sensei
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:```
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 Follower
I suppose i did. :D
Thanks DrByte.
Fields marked required must be completed.
Tell staff why this post should be reviewed.