The traditional Apache way to do that is to use mod_rewrite. In other words 
you pattern match URLs that don't exist with rewrite rules (regex) and map 
them to a URL which DOES exist, and convert whatever is left over into a 
query string or extra path info. Of course if any element of your URL 
translates to a file at any level Apache will consider the rest of the path 
to be 'extra', thus in your example AxKit declined to process because the 
file wasn't a mime-type it knows how to deal with, so it declined. You might 
need to give it a kick in the pants, maybe try calling your file 
'something.xsp' or somesuch. Personally I have the feeling it should be 
working, its just a minor URL translation problem.

On Thursday 12 December 2002 07:21 am, Dakkar wrote:
> I'm moving my first steps in AxKit. I have used Cocoon2, but it's just
> too big (and in Java...).
>
> I'm trying to write something like "everything2", but simpler (it will
> be probably read-only, with nodes added via programs that interact
> with the DB directly).
>
> For this, I need to convince AxKit to process URIs that are not on the
> filesystem. I had a look at the Wiki code, and tried to replicate it.
>
> My .htaccess (in ~dakkar/public_html/something)
> ---------------
> DirectoryIndex view
> SetHandler axkit
>
> AxNoCache On
> AxDebugLevel 10
> AxIgnoreStylePI On
>
> AxAddRootProcessor application/x-xsp NULL
> {http://www.apache.org/1999/XSP/Core}page AxAddRootProcessor
> application/x-xsp NULL {http://apache.org/xsp/core/v1}page
>
> AxAddXSPTaglib AxKit::XSP::ESQL
> AxAddXSPTaglib AxKit::XSP::Param
> -------------
>
> My first xsp (~dakkar/public_html/something/view):
> -------------
> <?xml version="1.0" encoding="utf-8"?>
> <xsp:page
>     xmlns:xsp="http://apache.org/xsp/core/v1";
>     xmlns:esql="http://apache.org/xsp/SQL/v2";
>     xmlns:param="http://axkit.org/NS/xsp/param/v1";
>
> <node>
> <xsp:logic>
>  no strict;
>  use Data::Dumper;
>
>  my $path=$r->path_info;
>  my ($page)=($path=~m|^/(\d+)$|);
>  <stuff>
>   <path><xsp:expr>$path</xsp:expr></path>
>   <page><xsp:expr>$page</xsp:expr></page>
>   <xsp:expr>Dumper($r);</xsp:expr>
>  </stuff>
> </xsp:logic>
> </node>
> </xsp:page>
> ------------
>
> If I make a request for /~dakkar/something/, I get:
> -----------
> <?xml version="1.0" encoding="UTF-8"?>
> <node><stuff><path></path><page></page>$VAR1 = bless( do{\(my $o =
> 152178816)}, 'AxKit::Apache' ); </stuff></node>
> -----------
>
> which is, more or less, what I expected (no additional path
> information).
>
> If I make a request for /~dakkar/something/0, I get a 404, and the log
> says:
> -------------
> [Thu Dec 12 12:26:01 2002] [warn] [client 127.0.0.1] [AxKit] fast handler
> called for /~dakkar/something/0 [Thu Dec 12 12:26:01 2002] [warn] [client
> 127.0.0.1] [AxKit] Content Provider Override: Apache::AxKit::Provider::File
> [Thu Dec 12 12:26:01 2002] [warn] [client 127.0.0.1] [AxKit] [req] File
> Provider given $r: /home/dakkar/public_html/something/0 [Thu Dec 12
> 12:26:01 2002] [warn] [client 127.0.0.1] [AxKit] checking if we process
> this resource [Thu Dec 12 12:26:01 2002] [warn] [client 127.0.0.1] [AxKit]
> file '/home/dakkar/public_html/something/0' does not exist or is not
> readable [Thu Dec 12 12:26:01 2002] [warn] [client 127.0.0.1] [AxKit]
> provider declined [Thu Dec 12 12:26:01 2002] [error] [client 127.0.0.1]
> File does not exist: /home/dakkar/public_html/something/0 --------------
>
> How can I convince AxKit (or Apache?) to serve all requests in the
> subtree via my XSP?
>
> TIA

-- 
Tod Harter
Giant Electronic Brain

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to