Page 1 of 1

Custom 404 page not displaying

Posted: Fri Jan 30, 2009 5:00 pm
by AlasdairGF
I've designed couple of custom error pages using one of my regular templates, unattached it from the menu item, and added the following to my .htaccess:

Code: Select all

ErrorDocument 404 http://www.mydomain.org/index.php/error404
ErrorDocument 500 http://www.mydomain.org/index.php/error500
As you can see, I'm using pretty urls.  So far so ordinary, as far as I can tell?  To check that the page is working, I navigate to http://www.mydomain.org/index.php/error404 and sure enough, there's the page I designed complete with the sarcastic comment designed to irritate & confuse.  That's what 404 pages are for, surely?!

However, when I try to go to www.mydomain.org/bla (which doesn't exist), I just get redirected to the site's home page.  Have tried this both with the "Enable Custom 404 Message" checkbox in "Site Admin > Global Settings" both ticked and un-ticked and no difference (in neither case do I get the placeholder text I put in for my "Custom 404 message" either!).

What am I doing wrong?  I'm guessing there's something really silly that I've overlooked, but can't for the life of me think what it might be.

Me: CMSMS 1.5.2 on Apache 2.2.11 with PHP 5.2.5 and MySQL 5.0.51a.
You: Cleverer than me with a quick & easy solution!

(Also, out of curiosity, what other error pages might be necessary?)

Re: Custom 404 page not displaying

Posted: Fri Feb 06, 2009 12:21 pm
by AlasdairGF
Additionally: If I go to www.stonewaterzen.org/index.php/bla then I do get the custom 404 page.  But again, if I just go to http://www.stonewaterzen.org/bla then I'm re-directed to the site's home page and not the 404 page.

Any ideas? Anyone?

Re: Custom 404 page not displaying

Posted: Thu Feb 12, 2009 2:03 am
by spcherub
Setting the redirects in the htaccess file means that the web server processes this before index.php (CMSMS) gets to look at it.

I'm not exactly sure how you have things setup, but with pretty URLs, you should be able to get to any (valid) page with http://www.mydomain.org/page instead of http://www.mydomain.org/index.php/page - Check if this works for a valid page. If it does, then update your redirects to use this instead.

Also if you are trapping 404s in the htaccess file, then the 404 mechanism built into CMSMS will not have a chance to work. To confirm this, comment out the 404 redirect in the htaccess file, then enable custom 404 in the Global Settings - it should work now. I know this does not solve you 500 dilemma but at least you can get one of the two working.

S

Re: Custom 404 page not displaying

Posted: Thu Jun 17, 2010 12:54 am
by cronosmachine
Hi,
I'm using CMS 1.7.1 "Escada".
I'm also do not understand how to use Site Admin » Global Settings » Custom 404 Handling admin console.
I already apply this setting, but when type in error path e.g. http://domain/bla it give me:
Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
domain
17-Jun-10 8:51:35 AM
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

This both same with or without checking "Enable Site Down Message"
What could be the cause this problem?
How to fix it?

Re: Custom 404 page not displaying

Posted: Thu Jun 17, 2010 1:03 am
by Dr.CSS
FYI you can now make a 404 error page like making/adding normal content pages, look in the content typew drop down...

Re: Custom 404 page not displaying

Posted: Fri Jun 25, 2010 12:37 pm
by cronosmachine
Dr.CSS wrote: FYI you can now make a 404 error page like making/adding normal content pages, look in the content typew drop down...
Sorry perhaps I not really understand what is the idea using error page on content (Content » Pages » Add New Content » Content Type: Error Page) and between site custom 404 handling (Site Admin » Global Settings » Custom 404 Handling) ?

Are you try to say site custom 404 handling (Site Admin » Global Settings » Custom 404 Handling) is not working? and batter using error page on content (Content » Pages » Add New Content » Content Type: Error Page) ?