Loading...
 
Documentation

Documentation


Custom Error Pages

posts: 19

I want to make some custom error pages for my tikiwiki site. I seen how to use an .htaccess file to define the location for custom error pages.

EX:

Files .htaccess >


order allow,deny

deny from all

</Files>


ErrorDocument 404 /errordocs/error404.htm


I'm wondering if using a static page in tikiwiki and linking it in this file would work?

EX:

Files .htaccess >


order allow,deny

deny from all

</Files>


ErrorDocument 404 /tiki-page.php?pageName=404


I know its obvious that for some errors this wont work, like php and database type problems.
I'm wondering if the error page wont work, will it use the apache default error page?

I'm sure other people have wanted to make their error pages look like part of the web site look.
Any takes on the cons of doing this in a production environment with tikiwiki?

posts: 3665 United States

This is exactly what I did on my Tiki. Here's my custom 404 page:
http://www.keycontent.org/tiki-page.php?pageName=404

I've had no problems — it works perfectly.

-Rick

> I want to make some custom error pages for my tikiwiki site. I seen how to use an .htaccess file to define the location for custom error pages.
>
> EX:

>
Files .htaccess >

>
> order allow,deny
>
> deny from all
>
>
>
>
>

> ErrorDocument 404 /errordocs/error404.htm

>
> I'm wondering if using a static page in tikiwiki and linking it in this file would work?
>
> EX:

>
Files .htaccess >

>
> order allow,deny
>
> deny from all
>
>
>
>
>

> ErrorDocument 404 /tiki-page.php?pageName=404

>
> I know its obvious that for some errors this wont work, like php and database type problems.
> I'm wondering if the error page wont work, will it use the apache default error page?
>
> I'm sure other people have wanted to make their error pages look like part of the web site look.
> Any takes on the cons of doing this in a production environment with tikiwiki?

posts: 19

Very nice. One Last question, What other errors can this work for?

> This is exactly what I did on my Tiki. Here's my custom 404 page:
> http://www.keycontent.org/tiki-page.php?pageName=404
>
> I've had no problems — it works perfectly.
>
> -Rick
>
> > I want to make some custom error pages for my tikiwiki site. I seen how to use an .htaccess file to define the location for custom error pages.
> >
> > EX:

> >
Files .htaccess >

> >
> > order allow,deny
> >
> > deny from all
> >
> >
> >
> >
> >

> > ErrorDocument 404 /errordocs/error404.htm

> >
> > I'm wondering if using a static page in tikiwiki and linking it in this file would work?
> >
> > EX:

> >
Files .htaccess >

> >
> > order allow,deny
> >
> > deny from all
> >
> >
> >
> >
> >

> > ErrorDocument 404 /tiki-page.php?pageName=404

> >
> > I know its obvious that for some errors this wont work, like php and database type problems.
> > I'm wondering if the error page wont work, will it use the apache default error page?
> >
> > I'm sure other people have wanted to make their error pages look like part of the web site look.
> > Any takes on the cons of doing this in a production environment with tikiwiki?


posts: 19

When testing the 404 error page, I'm finding that even typing a bad URL (http://mydomain.com/dont-exist.html) TikiWiki displays my site but the main body area is blank, it don't have my custom error. exclaim What am I doing Wrong? question

Tiki is installed in the www root dir so this should work.
The error pages in the server httpd.conf not in a .htaccess file.

It had lines to uncomment for custom error pages, I replaced the 404 with;
ErrorDocument 404 /tiki-page.php?pageName=404

It's strange that it don't show the apache error and don't show mine either.

posts: 3665 United States

Sorry, I'm unfamiliar with the http.conf configuration file. Is there a reason you can't use .htaccess?

-Rick


>
> Tiki is installed in the www root dir so this should work.
> The error pages in the server httpd.conf not in a .htaccess file.
>

posts: 19
Its just a more direct configuration of the apache server. Its the Apache configuration file http.conf that has the line to tell it to look for .htaccess files in the www dir's, some server admins choose to disable .htaccess files in the http.conf for security reasons when hosting virtual domains. Basically they both do the same thing in this case.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting