PDA

View Full Version : 404 Error Pages?


jdhf99
12-23-2004, 10:15 AM
Hello,

I was wondering how you can set up 404 Error pages globally for every account on the server. I'm using cPanel/WHM and I know in cPanel you can manually set them through your account. Is there a way to use WHM to do it on all accounts?

Thanks

maxhest
12-23-2004, 10:19 PM
You can do like a apache mod to do it I believe. I would have to look into how to do it.

jdhf99
12-24-2004, 01:20 AM
Do you know what MOD or know of any websites that say how to do it?

Thanks

Southernman
12-26-2004, 05:12 PM
Hello,

I was wondering how you can set up 404 Error pages globally for every account on the server. I'm using cPanel/WHM and I know in cPanel you can manually set them through your account. Is there a way to use WHM to do it on all accounts?

Thanks
You can use WHM to setup a "default" index page for when new clients are setup. This file goes into the "skeleton" directory. Surely you can place your custom coded 404 ".shtml" pages into this directory... you would have to make them unwriteable ofcourse.

That's just my 2 centavos, though. :)

[edited]

I have not done the above and would have to test it myself to be sure it would be an way to draw the traffic. Of course drawing the traffic is the easy part... what to do with it after getting the hits is the finesse part of the whole thing.

I did a quick google and found the best way with /root.

"If your server uses Apache, you can catch this traffic with a .htaccess file. there’s a DOT before the “htaccess”, and this file is usually placed in the same location your index.html file would be. It can contain just 1 line to catch the 404 traffic.

ErrorDocument 404 http://yourdomain.com

The URL after the 404 above can be anywhere you want to send them. A page on your domain, or maybe a sponsor link if your sponsor accepts straight 404 traffic and you don’t want to filter it."

Wide
12-26-2004, 08:23 PM
Can you make a 404.shtml page unwriteable for the user? how?

jdhf99
12-30-2004, 02:40 PM
Doesn't every user have access to their .htaccess file? I know there is an option inside of cPanel for every account so the user can make their own error pages. Won't this overwrite the one I set? Is there a way to CHMOD it so it can't be touched?

Thanks for the responses!

Wide
12-30-2004, 03:33 PM
You add this into your httpd.conf of apache. This way users cant use theire own 404 pages.

jdhf99
01-08-2005, 11:55 AM
You add this into your httpd.conf of apache. This way users cant use theire own 404 pages.

Any idea what to edit in the httpd.conf file? I opened it and it's just a little confusing :)

Thanks!