Error Page URL question

Error Page URL question

am 22.05.2007 23:40:44 von ajkurth

We're trying to develop a CONF file that includes a rewrite statement
that converts Web URLs to local hard drive URLs (already written and
functioning) but that will allow for the use of relative URLs for
search engine and ErrorDocuments.

In my current set up, with the rewrite in place I can only use
absolute URLs to point to the ErrorDocuments. However, this causes the
client to receive a wrong (great success!) return code, i.e., the the
error page shows up with the URL for the error page (rather than for
the page that was being navigated to, initially) in the address bar.

See http://www.cs.tut.fi/~jkorpela/www/404.html for background on this
tweak.

I'm curious if anybody has ideas about how I can get the error page to
show up, but with the requested url in the address bar, and in the
error page itself.

Re: Error Page URL question

am 23.05.2007 11:57:41 von shimmyshack

On May 22, 10:40 pm, ajku...@gmail.com wrote:
> We're trying to develop a CONF file that includes a rewrite statement
> that converts Web URLs to local hard drive URLs (already written and
> functioning) but that will allow for the use of relative URLs for
> search engine and ErrorDocuments.
>
> In my current set up, with the rewrite in place I can only use
> absolute URLs to point to the ErrorDocuments. However, this causes the
> client to receive a wrong (great success!) return code, i.e., the the
> error page shows up with the URL for the error page (rather than for
> the page that was being navigated to, initially) in the address bar.
>
> Seehttp://www.cs.tut.fi/~jkorpela/www/404.htmlfor background on this
> tweak.
>
> I'm curious if anybody has ideas about how I can get the error page to
> show up, but with the requested url in the address bar, and in the
> error page itself.

are you using an .htaccess file - I never had much luck with relative
paths inside htaccess files on some shared hosts, if you can use the
httpd conf then do so, this will allow you to use

ErrorDocument 404 "/custom/404.htm"

this type
ErrorDocument 402 http://www.example.com/subscription_info.html
as you say causes a redirect [302] instead of 404, which is why the
url changes, not what you want. If you have php (and probably perl)
installed, you can find the page on which the error originally
ocurred, and use it in the page. In that case you would probably use

ErrorDocument 404 "/custom/404.pl"
or
ErrorDocument 404 "/custom/error.php?code=404"
with

Re: Error Page URL question

am 23.05.2007 17:48:20 von ajkurth

On May 23, 4:57 am, shimmyshack wrote:
> On May 22, 10:40 pm, ajku...@gmail.com wrote:
>
>
>
> > We're trying to develop a CONF file that includes a rewrite statement
> > that converts Web URLs to local hard drive URLs (already written and
> > functioning) but that will allow for the use of relative URLs for
> > search engine and ErrorDocuments.
>
> > In my current set up, with the rewrite in place I can only use
> > absolute URLs to point to the ErrorDocuments. However, this causes the
> > client to receive a wrong (great success!) return code, i.e., the the
> >errorpageshows up with theURLfor theerrorpage(rather than for
> > thepagethat was being navigated to, initially) in the address bar.
>
> > Seehttp://www.cs.tut.fi/~jkorpela/www/404.htmlforbackground on this
> > tweak.
>
> > I'm curious if anybody has ideas about how I can get theerrorpageto
> > show up, but with the requestedurlin the address bar, and in the
> >errorpageitself.
>
> are you using an .htaccess file - I never had much luck with relative
> paths inside htaccess files on some shared hosts, if you can use the
> httpd conf then do so, this will allow you to use
>
> ErrorDocument 404 "/custom/404.htm"
>
> this type
> ErrorDocument 402http://www.example.com/subscription_info.html
> as you say causes a redirect [302] instead of 404, which is why theurlchanges, not what you want. If you have php (and probably perl)
> installed, you can find thepageon which theerrororiginally
> ocurred, and use it in thepage. In that case you would probably use
>
> ErrorDocument 404 "/custom/404.pl"
> or
> ErrorDocument 404 "/custom/error.php?code=404"
> with

The problem with employing PHP or something similar is that we're not
working with a full-blown server for this implementation. Rather, we
have - essentially - an external hard drive that installs an apache
webserver on the host machine as soon as it is plugged in, employing
apache and tomcat to serve the contents of the drive, with tomcat
working with luceneizer indexes to power a search engine for the
content. Thus, we cannot employ perl or php solutions, so I'm hoping
to find a solution at the apache configuration level.

Re: Error Page URL question

am 23.05.2007 17:49:06 von ajkurth

On May 23, 4:57 am, shimmyshack wrote:
> On May 22, 10:40 pm, ajku...@gmail.com wrote:
>
>
>
> > We're trying to develop a CONF file that includes a rewrite statement
> > that converts Web URLs to local hard drive URLs (already written and
> > functioning) but that will allow for the use of relative URLs for
> > search engine and ErrorDocuments.
>
> > In my current set up, with the rewrite in place I can only use
> > absolute URLs to point to the ErrorDocuments. However, this causes the
> > client to receive a wrong (great success!) return code, i.e., the the
> >errorpageshows up with theURLfor theerrorpage(rather than for
> > thepagethat was being navigated to, initially) in the address bar.
>
> > Seehttp://www.cs.tut.fi/~jkorpela/www/404.htmlforbackground on this
> > tweak.
>
> > I'm curious if anybody has ideas about how I can get theerrorpageto
> > show up, but with the requestedurlin the address bar, and in the
> >errorpageitself.
>
> are you using an .htaccess file - I never had much luck with relative
> paths inside htaccess files on some shared hosts, if you can use the
> httpd conf then do so, this will allow you to use
>
> ErrorDocument 404 "/custom/404.htm"
>
> this type
> ErrorDocument 402http://www.example.com/subscription_info.html
> as you say causes a redirect [302] instead of 404, which is why theurlchanges, not what you want. If you have php (and probably perl)
> installed, you can find thepageon which theerrororiginally
> ocurred, and use it in thepage. In that case you would probably use
>
> ErrorDocument 404 "/custom/404.pl"
> or
> ErrorDocument 404 "/custom/error.php?code=404"
> with

The problem with employing PHP or something similar is that we're not
working with a full-blown server for this implementation. Rather, we
have - essentially - an external hard drive that installs an apache
webserver on the host machine as soon as it is plugged in, employing
apache and tomcat to serve the contents of the drive, with tomcat
working with luceneizer indexes to power a search engine for the
content. Thus, we cannot employ perl or php solutions, so I'm hoping
to find a solution at the apache configuration level.

Re: Error Page URL question

am 23.05.2007 17:49:12 von ajkurth

On May 23, 4:57 am, shimmyshack wrote:
> On May 22, 10:40 pm, ajku...@gmail.com wrote:
>
>
>
> > We're trying to develop a CONF file that includes a rewrite statement
> > that converts Web URLs to local hard drive URLs (already written and
> > functioning) but that will allow for the use of relative URLs for
> > search engine and ErrorDocuments.
>
> > In my current set up, with the rewrite in place I can only use
> > absolute URLs to point to the ErrorDocuments. However, this causes the
> > client to receive a wrong (great success!) return code, i.e., the the
> >errorpageshows up with theURLfor theerrorpage(rather than for
> > thepagethat was being navigated to, initially) in the address bar.
>
> > Seehttp://www.cs.tut.fi/~jkorpela/www/404.htmlforbackground on this
> > tweak.
>
> > I'm curious if anybody has ideas about how I can get theerrorpageto
> > show up, but with the requestedurlin the address bar, and in the
> >errorpageitself.
>
> are you using an .htaccess file - I never had much luck with relative
> paths inside htaccess files on some shared hosts, if you can use the
> httpd conf then do so, this will allow you to use
>
> ErrorDocument 404 "/custom/404.htm"
>
> this type
> ErrorDocument 402http://www.example.com/subscription_info.html
> as you say causes a redirect [302] instead of 404, which is why theurlchanges, not what you want. If you have php (and probably perl)
> installed, you can find thepageon which theerrororiginally
> ocurred, and use it in thepage. In that case you would probably use
>
> ErrorDocument 404 "/custom/404.pl"
> or
> ErrorDocument 404 "/custom/error.php?code=404"
> with

The problem with employing PHP or something similar is that we're not
working with a full-blown server for this implementation. Rather, we
have - essentially - an external hard drive that installs an apache
webserver on the host machine as soon as it is plugged in, employing
apache and tomcat to serve the contents of the drive, with tomcat
working with luceneizer indexes to power a search engine for the
content. Thus, we cannot employ perl or php solutions, so I'm hoping
to find a solution at the apache configuration level.

Re: Error Page URL question

am 23.05.2007 17:50:22 von ajkurth

On May 23, 4:57 am, shimmyshack wrote:
> On May 22, 10:40 pm, ajku...@gmail.com wrote:
>
>
>
>
>
> > We're trying to develop a CONF file that includes a rewrite statement
> > that converts Web URLs to local hard drive URLs (already written and
> > functioning) but that will allow for the use of relative URLs for
> > search engine and ErrorDocuments.
>
> > In my current set up, with the rewrite in place I can only use
> > absolute URLs to point to the ErrorDocuments. However, this causes the
> > client to receive a wrong (great success!) return code, i.e., the the
> >errorpageshows up with theURLfor theerrorpage(rather than for
> > thepagethat was being navigated to, initially) in the address bar.
>
> > Seehttp://www.cs.tut.fi/~jkorpela/www/404.htmlforbackground on this
> > tweak.
>
> > I'm curious if anybody has ideas about how I can get theerrorpageto
> > show up, but with the requestedurlin the address bar, and in the
> >errorpageitself.
>
> are you using an .htaccess file - I never had much luck with relative
> paths inside htaccess files on some shared hosts, if you can use the
> httpd conf then do so, this will allow you to use
>
> ErrorDocument 404 "/custom/404.htm"
>
> this type
> ErrorDocument 402http://www.example.com/subscription_info.html
> as you say causes a redirect [302] instead of 404, which is why theurlchanges, not what you want. If you have php (and probably perl)
> installed, you can find thepageon which theerrororiginally
> ocurred, and use it in thepage. In that case you would probably use
>
> ErrorDocument 404 "/custom/404.pl"
> or
> ErrorDocument 404 "/custom/error.php?code=404"
> with - Hide quoted text -
>
> - Show quoted text -

The problem with employing PHP or something similar is that we're not
working with a full-blown server for this implementation. Rather, we
have - essentially - an external hard drive that installs an apache
webserver on the host machine as soon as it is plugged in, employing
apache and tomcat to serve the contents of the drive, with tomcat
working with luceneizer indexes to power a search engine for the
content. Thus, we cannot employ perl or php solutions, so I'm hoping
to find a solution at the apache configuration level.