I think you will find very little agreement on how something like this should be configured, having only one option, instead of an ordered list makes it less useful. Patching the core in this critical spot also seems to be too much for a specific feature like this.
One thing I'm not clear on (patch doesn't include enough detail) is if a directory url has to come in with a / in order to be considered a request for a directory. Usually a redirect should be issued if there is a directory corresponding to the url , like you don't have to put the / on the end shell directory commands. In other words, you chould do a file command to see if there is actually a directory corresponding to the request url. I also don't know where exactly this appears in the request cycle. If you change the internal URL, you may mess up any registered filters or registered procs which might be handling this url. My suggestion is to use a filter to do this as an add on module based upon ns_rewriteurl. It may not be as fast, but it will be vastly more configurable. Test a redirect (triggered by a 'not found' internal redirect and a directory proc) and info on rewriteurl: <http://rmadilo.com/files/nsrewrite/doc> (Note that you could also use the 404 page to do exactly what you want here, which is to look for another url if the request doesn't exist.) tom jackson On Saturday 15 April 2006 08:57, John Buckman wrote: > On Apr 15, 2006, at 4:07 pm, dhogaza@PACIFIER.COM wrote: > >> I'm pretty sure my code below is harmless and appears bug-free... > > > > Well, it would break OpenACS. If such a feature is added, it > > should be > > optional and configurable. > > What I was suggesting was a new optional parameter in config.tcl: > > ns_param default_ext ".adp" > > which would, in the sample-config.tcl file, be commented out and thus > have no effect. Only if you enable it would this patch take effect. > > What I'd like to know is if others would find this feature useful. > > -john > > ps: > > One small bug in what I sent to the list. In case anyone tried to > compile the change and you're using an older C compiler, you need to > move the > > char * dotpos; > > to the top of the function, like so: > > static void > SetUrl(Ns_Request * request, char *url) > { > Ns_DString ds1, ds2; > char *p; > char * dotpos; > > otherwise you'll get a compile time error. > > -john > > > > -- > AOLserver - http://www.aolserver.com/ > > To Remove yourself from this list, simply send an email to > <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the > email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.