Adding Custom Error Pages for non-existant pages

YukFoo

Well-Known Member
Sep 1, 2002
135
0
166
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.
 

hedgehog

Well-Known Member
Nov 3, 2001
122
0
316
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&
 

hedgehog

Well-Known Member
Nov 3, 2001
122
0
316
By the way, you could also insert a meta refresh tag in your header... Works just the same.

Good luck
 

YukFoo

Well-Known Member
Sep 1, 2002
135
0
166
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. :)