I had a hard time initially getting Mason set up to do this very same thing. The correct documentation you are looking for resides here:
http://www.masonhq.com/docs/manual/Admin.html#allowing_directory_requests You have to specify in your Mason configuration (either in a mason perl script wrapper or in your httpd.conf) that you do not want Apache handling directory requests. This is done with the decline_dirs method in HTML::Mason::ApacheHandler. (http://www.masonhq.com/docs/manual/Params.html#decline_dirs) Even following the directions provided in the documentation didn't seem to work properly right away and it took me a little bit of experimentation and tweaking before I could get it to do what I wanted. I don't have my solution here with me and my server is at home and isn't connected to the internet right now (thanks to a move to our new home this weekend), but if you still can't get it working, send me an email and I'll try to dig it up for you and will email you later off-list. Hope this helps, -Eric On 8/23/06, Ogden <[EMAIL PROTECTED]> wrote: > Here is a clearer example of my problems with creating this dhandler to > work the way I want it to: > > Before, I had: > > <LocationMatch "\.mhtml$"> > SetHandler perl-script > PerlHandler MyApp::Handler > </LocationMatch> > > Where MyApp::Handler was nothing more than: > > sub handler > { > my ($r) = @_; > my $site = $r->dir_config('SiteName'); > return $ah{$site}->handle_request($r); > } > > > This works perfectly right now: > > /index.mhtml, /some_dir/index.mhtml > > Would appear fine and the autohandler was called fine. > > However, I need to be able to receive dynamic URLs: > > /joe_smith/ > > Which would look up in a database which ID the name is and then forward to > the proper URL ( /information?id=56 ). > > I therefore put a dhandler as a test with an error message for debugging. > If I call: > > /no_such_page.mhtml or /random_text.mhtml > > The dhandler is called properly and the error message pops up. > > However, if a directory is requested, /joe_smith/, Apache returns "Not > Found". The dhandler doesn't even get called (decline_dirs is set to 0). > > I then tried to do this: > > <Location /> > SetHandler perl-script > PerlHandler MyApp::Handler > </Location> > > This worked as intended but does not call the index.mhtml page if a page > is not specified. It calls the dhandler (for example, using the uri, /). > If I manually type out /index.mhtml, then it works fine. > > I am confused as to why this is not recognizing the index files - I must > have misconfigured something but am unsure as to what. > > Thank you very much > > Ogden > > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Mason-users mailing list > Mason-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mason-users > -- Eric Ryan Harrison, Developer model13 Designs ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users