bronzemonkey Posted June 1, 2007 Share Posted June 1, 2007 I'm trying to get an Apache/2.0.54 server to use a custom 404 page so that I can provide visitors with links to the homepage, sitemap, etc of a website. Problem is that it doesn't seem to be working as intended...I am still getting the standard 404. I've made a file .htaccess which contains: ErrorDocument 404 /custom404.php I've made a file custom404.php in the same directory which uses the site's default layout but with text warning that file not found, links to other places, etc. The website is hosted on a server that hosts several other sites. The directory structure for this website is as follows: WEBSITENAME >cgi-bin >homes >logs >public_html All the content for the website is contained in the public_html directory. This is where I have both the .htaccess and custom404.php files. Hopefully someone can shed some light on this problem. Thanks Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 1, 2007 Share Posted June 1, 2007 Make sure your host allows you to use .htaccess files. You can test this by adding an invalid option into a .htaccess file like so: aaa Save that file in public_html now go to your website. If you get a 500 Internal Server Error then .htaccess files are enabled. if you don't then you can't use .htaccess as they are not enabled. You will have to edit the httpd.conf file to enabled .htaccess files. Quote Link to comment Share on other sites More sharing options...
bronzemonkey Posted June 1, 2007 Author Share Posted June 1, 2007 Ok thanks. I tested the .htaccess and it made no difference so it mustn't be enabled. Is my best option to email the person who owns the server and ask if he can enable .htaccess for the website? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 2, 2007 Share Posted June 2, 2007 I guess it wouldn't hurt if you asked the host to allow you to use .htaccess files. Or ask how you can set up your own custom 404 error pages. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.