bjs Posted April 29, 2004 Posted April 29, 2004 I've created a custom 404 error page in cpanel but it's not showing up when I got to my site and test it. Is there a tutorial somewhere that explains exactly how this works? Quote
TCH-Bruce Posted April 29, 2004 Posted April 29, 2004 There's really nothing special about the page except that it has an extension of .shtml intead of .html or .htm So there should be a file called 404.shtml in your public_html folder. That page would display whenever someone tried to access a page on your site that did not exist. Quote
bjs Posted April 30, 2004 Author Posted April 30, 2004 Right, the 404.shtml page was created, and if I go to www.mysite.com/404.shtml I can see it, but if I try to go to page that doesn't exist, I get the standard 404 error rather than my custom file. Quote
TCH-Rob Posted April 30, 2004 Posted April 30, 2004 Did you add the .htaccess redirect or was it already there? Quote
TCH-Rob Posted April 30, 2004 Posted April 30, 2004 I thought it worked without that. Make sure there isnt one already there, if there is, remove it. If not then try something like ErrorDocument 404 /path/to/404.shtml and see if that fixes it. Quote
DarqFlare Posted April 30, 2004 Posted April 30, 2004 Yeap. Gotta love the HTACCESS ability to define error pages. Quote
TCH-Bruce Posted April 30, 2004 Posted April 30, 2004 I thought it worked without that. Make sure there isnt one already there, if there is, remove it. If not then try something like ErrorDocument 404 /path/to/404.shtml and see if that fixes it. There is nothing in my htaccess file and my custom 404 works fine. Quote
TCH-Bruce Posted April 30, 2004 Posted April 30, 2004 Right, the 404.shtml page was created, and if I go to www.mysite.com/404.shtml I can see it, but if I try to go to page that doesn't exist, I get the standard 404 error rather than my custom file. Can we have a link to your site and maybe we can figure out why it's not displaying for you? Quote
TCH-Don Posted April 30, 2004 Posted April 30, 2004 Make sure that the file size is greater than 512 bytes, I have used 404.shtml without an entry in .htaccess Quote
brycefinney Posted November 16, 2004 Posted November 16, 2004 Just came across this post while I was searching this topic. I was wondering, is this only for dedicated servers or can I do this w/ my re-seller account? Quote
TCH-Thomas Posted November 16, 2004 Posted November 16, 2004 (edited) Yes, you can set up your own 404 page Also, welcome to your extended family brycefinney. Edited November 16, 2004 by TCH-Thomas Quote
TCH-Bruce Posted November 16, 2004 Posted November 16, 2004 Welcome to the family and forums brycefinney! Quote
brycefinney Posted November 16, 2004 Posted November 16, 2004 Okay, so I notice that 404.shtml file in my public_html folder. Is this something I create first, and then place in there? Or is there an existing file that I'm supposed to edit? Thank you for the fast responses! Rock Sign Quote
TCH-Bruce Posted November 16, 2004 Posted November 16, 2004 It's a file you need to create. You can create it directly using cPanel or you can create it offline and upload it to the server. Quote
dcumpian Posted November 16, 2004 Posted November 16, 2004 Is this custom 404 any different than a standard web page? IOW, is there anything "special" about it other than the name? Thanks, Dan Quote
TCH-Thomas Posted November 16, 2004 Posted November 16, 2004 (edited) No. Just remember to add ErrorDocument 404 http://******/error404.html in the htaccess. Edited November 16, 2004 by TCH-Thomas Quote
TCH-Bruce Posted November 16, 2004 Posted November 16, 2004 (edited) If you leave the extension .SHTML you should not need to add the ErrorDocument statement to the .htaccess file. Just to be clear. Edited November 16, 2004 by TCH-Bruce Quote
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.