|
From: Chris W. <ch...@cw...> - 2001-10-24 20:46:22
|
* Peter Beardsley (pbe...@ap...) [011024 16:42]: > Is there any way to facilitate the default index page behavior you > see with Apache ie: > > http://www.foo.com/bar/ > > actually loads > > http://www.foo.com/bar/index.html This already exists, actually. As long as '/bar/' is being handled by the 'basic_page' handler (in the 'static_page' package, an unfortunate naming mishap) it will look for an index page whose name depends on whether OI is getting the content from the filesystem or the database. And in general, you can (and should!) specify a default action for a handler that gets called when no other action is specified. So when you request: http://www.foo.com/User/ The 'user' handler in 'base_user' gets the request and, finding no action, uses the default action of 'search_form'. > I realize that in OI the first URL itself can be a document so it > kinda breaks the rules, but I would like not to have to maintain two > identical copies of the same document. > > I could mangle the URL with mod_rewrite, but I thought I'd check > with you to see if maybe there's some way of doing like a "symbolic > link" or some other trick. Yep, you should be able to go into: $WEBSITE_DIR/pkg/static_page-x.xx/conf/action.perl and set the keys: 'basicpage'->'object_home_name' and/or: 'basicpage'->'filesystem_home_name' To the name you want (by default they're set to 'home' and 'index.html', respectively). It currently only handles one name (vs. the Apache DirectoryIndex multiple names). However, I'm rewriting this module right now -- literally getting ready to test the first version :-) -- and you'll be able to specify multiple names in it. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |