HostRod

Member
Apr 13, 2003
22
0
151
Hello Everyone, just wondering if there is a way to make my own custom error pages for the entire server? Meaning, if a user account has not setup thier own custom error pages, instead of it defaulting to the bland text error page, I am wondering if there is a way to update or change the default ones so all accounts that have not created customs ones will see my custom ones instead.

( Holy run on sentence - lol )

If you get what I mean, let me know.

Thanks.

Chris

I am on, cPanel - WHM - Linux
 

HostRod

Member
Apr 13, 2003
22
0
151
The best way to describe it, I want one page for each error code similar to the suspend or new account page that you can make as a default for server wide.

Let me know!

Thanks, Chris
 

picoyak

Well-Known Member
Jun 10, 2004
72
0
156
I think, along with index.html in the skeleton directory, you can simply put...

404.shtml
403.shtml
etc

in there also. That way they would be there when a new account is created. Now this wouldn't stop the user for each account from removing/changing it, but at least it would be there initially.

That's my only idea :p
 

Marty

Well-Known Member
Oct 10, 2001
630
1
318
Create the error pages and place them somewhere on the server. Then create an .htaccess file with the code to specify the error pages and place that .htaccess file in /home.
 

HostRod

Member
Apr 13, 2003
22
0
151
Hi marty thank you. Any suggestion on what I should make the .htaccess file code? No idea how to do that, and would I place a copy into every clients /home/ directory?

Thanks!

Chris
 

nickn

Well-Known Member
PartnerNOC
Jun 15, 2003
617
1
168
You can put a 404.html in yoru skel directory (find it through WHM, usually in /root/) then use this script the fix 404 errors script found at cplicensing.net
 

poppyq

Well-Known Member
Jul 15, 2003
54
0
156
Portland, OR
cPanel Access Level
Root Administrator
Is there a way to make it so it uses php files instead of shtml? I used to have a php file that included html headers for my 404 pages (on ensim) but after moving to cpanel I lost that feature. Unless you can include html files as header/footer with shtml and I just don't know how to do that.
 

PWSowner

Well-Known Member
Nov 10, 2001
2,940
4
343
ON, Canada
That's why .shtml is used, to allow inclusion of files. Here's an example:

Code:
<!--#include virtual="/footer.txt" -->

If you want to use php instead, just add this:

Code:
ErrorDocument 404 /404.pws
to either the virtualhost entry in the httpd.conf file, or the .htaccess file for the domain.
 

sayouly

Member
Oct 15, 2004
9
0
151
Need help with the fix404errors

I would like to create system wide error pages and have read all the posts but am still confused.

1. what extension do use when I save the fix404errors .cgi, .pl ????
2. Where on my server do I put the fix404errors script
3. Does it need chmod?
4. Once installed, will this create system erorpages for existing users as well as any new users, or only for accounts created after the scripts are installed?

Hope someone out there can help me. Thanks in advance.

John