Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Sep 2002
    Posts
    135

    Default Adding Custom Error Pages for non-existant pages

    Looking to add custom error pages so that non-existant pages forward to main index.php page.

    Before I had my own server I'd used the meta refresh tag, but this isn't working. Any ideas.

  2. #2
    Member
    Join Date
    Nov 2001
    Posts
    122

    Default

    You could simply insert some javascript code in the page to have it auto load the index.php page... should be a piece of cake... just add the following lines in your custom error page.

    Naturally, you should remember to replace the domain name with your own.

    &Script Language=&JavaScript&&
    &!--
    setTimeout (&changePage()&, 0);
    function changePage() {
    self.parent.location= &http://www.yourdomain.com/&;
    }
    // --&
    &/script&

  3. #3
    Member
    Join Date
    Nov 2001
    Posts
    122

    Default

    By the way, you could also insert a meta refresh tag in your header... Works just the same.

    Good luck

  4. #4
    Member
    Join Date
    Sep 2002
    Posts
    135

    Default

    HedgeHog,

    I appreciate the input. (kick myself). Helps when you read the directions a little. Custom error pages should be at least 10KB in size. IF they aren't the meta refresh won't work. My pages were only like 1 KB.

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 Slav in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-01-2004, 07:21 AM
  4. Custom Error Pages
    By lexmark in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-25-2003, 09:48 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube