Michael Schmissrauter wrote:

> Hi there,
>
> I'm using JServSSI and Apache (with FP98 server ext. :-(  ) running on
> Linux using .shtml as SSI extension.
> Everything works fine, but I'm wondering how to customize the error
> response to "file not found" conditions. Since sometimes .shtml files get
> removed from the website but are still in search engines indexes users will
> be pointed to non existent pages.
> But instead of responding with my 404 error document Apache will forward
> the request to JServSSI servlet (as configured), JServSSI will not find the
> file and responds with a message like
>
> Java Server Side Include Error
> Requested URI /hallo.shtml is not a file. Please, make sure you request a
> java server side include file.
>
> I would like to inform the user that she/he requested a non existent page
> and should go back to the homepage.
>
> Any ideas how to get a customized error response from JServSSI without
> modifying sources?

I think you are thinking in the wrong terms. Let Apache not find the resource,
or any servlet returning a 404 error. Apache will then look at the
ErrorDocument directive to see what to do.
The ErrorDocument directive (normally found in srm.conf). Either place a
document or a complete URL for what to be served instead. For instance;

ErrorDocument 404  http://thisserver.thisdomain.com/servlets/notfound.shtml

Niclas



------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]

Reply via email to