custom 404 error pages

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
thile
Forum Members
Forum Members
Posts: 25
Joined: Mon Aug 25, 2008 3:57 pm

custom 404 error pages

Post by thile »

Hi,
I’m trying to get some custom error pages up and working.
Like the classic page not found, error 404.

I have enabled “Custom 404 Message” in the Global Settings and edited the text also. Next I try to open my browser and try some urls that do not exist.
Like… www.mydomain.dk/blabla.html

This is the responce:


404 Not Found

Not Found
The requested URL /php-bin/index.php was not found on this server.
Additionally, a 500 Internal Server Error
error was encountered while trying to use an ErrorDocument to handle the request.


I use apache modrewrite to get some userfriendly urls.
This is my ..htaccess file

RewriteEngine on
#
#Sub-dir e.g: /cmsms/
RewriteBase /
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]



I also looked in the tips and tricks, and found the exsample of using apache ErrorDocument. But I don't have any access to mess with the apache conf.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm

Re: custom 404 error pages

Post by Russ »

You have no 'ErrorDocument' pointer to an error page, you can put them in your .htaccess file for 404, or indeed other errors.
Last edited by Russ on Mon Sep 22, 2008 3:50 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”