imtechnology
New member
- Joined
- Sep 17, 2010
- Messages
- 1
Hi All,
i am having trouble getting custom error pages working.
I have added the following lines to .htaccess
The files do exist and I am able to edit them through the directadmin interface. However when i visit a non existent URL I do not see the custom url message. Instead all I see is a page whose source code only has:
and not the usual:
The custom URLs do work for other domains just not this one.
The .htaccess does work because URL rewrite does work (below is the full .htaccess file I have published).
Is anyone able to advise what could be wrong?
Thanks for your help!
Ed.
i am having trouble getting custom error pages working.
I have added the following lines to .htaccess
Code:
ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
The files do exist and I am able to edit them through the directadmin interface. However when i visit a non existent URL I do not see the custom url message. Instead all I see is a page whose source code only has:
Code:
<h1>404 Not Found</h1>
and not the usual:
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /uigjkb was not found on this server.
<HR>
<I>www.domain.com</I>
</BODY></HTML>
The custom URLs do work for other domains just not this one.
The .htaccess does work because URL rewrite does work (below is the full .htaccess file I have published).
Is anyone able to advise what could be wrong?
Thanks for your help!
Ed.
Code:
ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
php_flag apc.cache_by_default Off
RewriteEngine On
RewriteCond %{HTTP_HOST} ^maindomain.com
RewriteRule (.*) http://www.maindomain.com/$1 [R=301,L]
# Use this set of 3 lines for each of your journals
RewriteCond %{SERVER_NAME} ^spunti.com.au
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/journal/$1 [L]
# Use this set of 3 lines for each of your journals
RewriteCond %{SERVER_NAME} ^www.journal.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/journal/$1 [L]
# Use this set of 3 lines to allow access to the site level
RewriteCond %{SERVER_NAME} ^maindomain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/index/$1 [L]
# Use this set of 3 lines to allow access to the site level
RewriteCond %{SERVER_NAME} ^www.maindomain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/index/$1 [L]