Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    kgx
    kgx is offline
    Registered User
    Join Date
    Aug 2005
    Posts
    2

    Exclamation Using php in custom error pages

    Hi. Hope this is the right place to post. I'm hosted on a remote server (thus not in control of cpanel's installation) and I needed to use php in custom error pages. However it doesn't seem to work. I tried adding the mime types (for shtml) and even tried saving the file as php, but no luck It has cpanel version 10.2.0-RELEASE 82 on Apache 1.3.

    Thanks heaps for your help

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    The easiest way would be to pop a .htaccess file in your public_html directory.

    Here's what I have in mine to get a php-based 404 page:

    Code:
    ErrorDocument 404 /~username/404.php
    Repeat the same for all the errors you want to catch.

  3. #3
    kgx
    kgx is offline
    Registered User
    Join Date
    Aug 2005
    Posts
    2

    Default

    Thanks

    PS: Maybe one of the developers could add this in as a feature in cpanel

Similar Threads & Tags
Similar threads

  1. Custom Error pages
    By tommo1590 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-16-2009, 08:58 PM
  2. Custom error pages
    By wills in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-31-2004, 01:22 AM
  3. Custom Error Pages
    By lexmark in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-25-2003, 09:48 AM
  4. Adding Custom Error Pages for non-existant pages
    By YukFoo in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-16-2002, 03:07 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube