You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Matias Alejo Garcia <ma...@confronte.com> on 2006/08/31 20:04:57 UTC

404 error

Hi all,

We have a problem generating a custom 404 error page using mod_perl.

When a page is not found, the code sucessfull renders our error page, and
send it to the client.

The HTTP code is also sucessfully set to 404. However, at the end of our
page, apache adds it default 404 error page:
  Not found
  The requeste page was not found at the server ...

We are using a modperl handler, which, in this case, returns
Apache2::Const::NOT_FOUND to apache; after sending our page using
$r->print(xx);

Is it posible to stop apache adding it's default page to ours?

Thanks!!
matías

-- 
http://confronte.com
Compará y comprá mejor

Re: 404 error

Posted by Matias Alejo Garcia <ma...@confronte.com>.
On 8/31/06, Matias Alejo Garcia <ma...@confronte.com> wrote:
>
> We have a problem generating a custom 404 error page using mod_perl.
> When a page is not found, the code sucessfull renders our error page, and
> send it to the client.
> The HTTP code is also sucessfully set to 404. However, at the end of our
> page, apache adds it default 404 error page:
>   Not found
>   The requeste page was not found at the server ...
>
> We are using a modperl handler, which, in this case, returns
> Apache2::Const::NOT_FOUND to apache; after sending our page using
> $r->print(xx);
>
| Is it posible to stop apache adding it's default page to ours?


We have fix the problem always returning Apache2::Const::OK, and previously
issuing $r->status(Apache2::Const::NOT_FOUND);

thanks!

matías





-- 
http://confronte.com
Compará y comprá mejor