Forum OpenACS Q&A: How to use a URL without tcl extension in aolserver

Request notifications

Hi, I want to use a URL who points to a tcl file, but I don't want the '.tcl' part appears in the link, i.e. 'www.web.com/file', where 'file' in the link equals 'file.tcl'

How can I get this?.

With aolserver 4.05 I get the content of the code in my browser as text.

If I use the full name 'file.tcl' all goes OK.

I vaguely remember I could use a link to a tcl file without using the .tcl extension and aolserver searching the dir for a file with the same name?.

Am I wrong?

I wish the following priority in the files:
file (without .tcl extension), file.tcl, file.adp, file.html

Need I to add some parameter to the aolserver configuration?

Thanks.

I guess you aren't using openacs?, because if you were that case will work well.
Collapse
Posted by Jorge Garcia on
Right, Rocael.

Any help for aolserver only?.

Collapse
Posted by Gustaf Neumann on
have you set
ns_param enabletclpages true
in section
ns_section "ns/server/${servername}"
of your config.tcl file?

best regards

Collapse
Posted by Jorge Garcia on
Yes.

enabletclpages is set to true.

Collapse
Posted by xx xx on
Try pointing NoExtension parameter (under ns_section "ns/mimetypes") to tcl, maybe.

http://www.aolserver.com/docs/admin/config-detailed.html

No Aldert, I don't think that is going to work. Jorge, see my answer to your question on the AOLserver list, and also Ramesh Venkitaswaran's answer. Those are the correct solutions to what you're asking for here.
Collapse
Posted by xx xx on
You are probably right, Andrew. If haven't looked at how OpenACS has solved it, but what about mapping a directory? This would specify that the server should parse all files in that directory for Tcl commands, right?

ns/server/'servername'/adp
ns_param "map" "/mypages-dir"