[Linux-disciples] SSI and ErrorDocuments
Adam Rosi-Kessel
adam at rosi-kessel.org
Sun Sep 12 12:09:01 EDT 2004
Still going further afield from the sort of solution you're looking for,
you could explicitly exclude a certain set of URLs from Rewrite-ing at
all; there is a NOT type joinder for RewriteCond, so why not just leave
out the nonexistent_url page; or some other kind of uniform URL form that
says "this sort of URL should not go through the template filter"?
On Sun, Sep 12, 2004 at 12:05:41PM -0400, Stephen R Laniel wrote:
> On Sun, Sep 12, 2004 at 11:46:03AM -0400, Adam Rosi-Kessel wrote:
> > Without testing it, couldn't you do something like
> >
> > ErrorDocument 404 error/404.html
> >
> > RewriteCond [...blah...]
> > RewriteRule ^.*$ nonexistent_url.html [r]
>
> Hmm: check out how it works here:
>
> http://jasonandfischer.com/foo.html
>
> The trouble is that this gets rewritten to
>
> http://jasonandfischer.com/nonexistent_url.html
>
> which gets translated by a later rewrite into
>
> http://jasonandfischer.com/template.shtml?nonexistent_url.html
>
> Then the template tries to load nonexistent_url.html into
> the right frame, finds that it doesn't exist, and gives the
> same ' [an error occurred while processing this directive]'
> message.
>
> I tried tweaking Adam's idea to
>
> RewriteRule ^.*$
> http://jasonandfischer.com/newfischer/template.shtml?error/nonexistent_url.html
> [L]
>
> Same problem. Basically, whenever Apache passes the request
> to the SSI template that I've set up, we run into the
> problem that I'm talking about.
>
> There ought to be a way to tell SSI itself to return a 404
> error when the #include directive fails. It's possible to
> customize the error message that SSI spits out when #include
> fails [1], so it should also be possible to customize the
> error code ... shouldn't it?
>
> [1] - http://shorl.com/gibiverufrile
>
> --
> ``Nobody ever picks yellow out of the [crayon] box just for
> the Hell of it, but once you start coloring in whatever
> coloring book or colored coloring you colored, there's a
> 99.9% chance you'll eventually need the yellow for
> something. In that I cheerfully liken it to bay leaves.''
> -http://x-entertainment.com/articles/0913/
>
> _______________________________________________
> Linux-disciples mailing list
> Linux-disciples at lists.bostoncoop.net
> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
--
Adam Rosi-Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20040912/d6cc9f51/attachment.pgp
More information about the Linux-disciples
mailing list