1 (edited by Jaime 2012-12-07 09:23)

Topic: Custom 404 error page

Hi,

I would to know if exists any way to create a custom 404 error page...
Exists any plugin for it or I must to do it manually?


Thanx and regards!

2

Re: Custom 404 error page

There's a hook

re_page_not_found

It will allow you to modify slightly 404 page. Go to /rewrite.php line around 80 to see details.

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.

3

Re: Custom 404 error page

Thanx so much!

Re: Custom 404 error page

I have been to the page: and see this code kindly tell me how to create or link to my standard 404.shtml page that exist in my root directory:

************************


// If we don't know what to rewrite to, we show a bad request messsage
if (empty($rewritten_url))
{
    define('FORUM_HTTP_RESPONSE_CODE_SET', 1);
    header('HTTP/1.1 404 Not Found');

5 (edited by Jawsh 2014-04-02 12:51)

Re: Custom 404 error page

Bumping this thread.

Wanting to know how to change it to go to a custom 404 page as well.
Found all the information located in the rewrite.php, but still wanting to add link to make it go to a custom 404 that i personally made.

Normally you would do so by adding: ErrorDocument 404 /(custompagenamehere.html) to your .htaccess but here that's not the case.

Re: Custom 404 error page

Inside rewrite.php, add these 2 lines right after ($hook = get_hook('re_page_not_found')) ? eval($hook) : null;:

include FORUM_ROOT.'custompagenamehere.html';
exit();
If you want to contact me quickly - send e-mail, not PM.
<?php $t='<?php $t=%c%s%c; printf($t,39,$t,39,10);%c'; printf($t,39,$t,39,10);

7

Re: Custom 404 error page

Thanks, that worked perfect.

8 (edited by kudataz 2014-04-04 16:46)

Re: Custom 404 error page

add this code to ur htaccess..

ErrorDocument 404 /custom404.php
sorry my BAD english T___T
Have a nice day >.<
(^____^)v

9 (edited by Jawsh 2014-04-06 00:50)

Re: Custom 404 error page

kudataz wrote:

add this code to ur htaccess..

ErrorDocument 404 /custom404.php

Keeshii fixed my issue, if you read my comment above you would see that command doesn't work that way since Punbb has it's own set of files that points to the 404 error page.

Re: Custom 404 error page

hmm.. thats work for me on my h taccess.
hhee.. nope, just share big_smile

sorry my BAD english T___T
Have a nice day >.<
(^____^)v