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.
custom 404 error pages
Re: custom 404 error pages
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.