Tclhttpd supports a custom code library, which is a directory where you can put Tcl scripts that are loaded upon startup. The distribution includes a couple of samples in the custom directory.
You start the server like this:
tclsh8.3 bin/httpd.tcl -port 8000 -library my_custom_code_directory -docRoot my_htdocs
It start the server (on port 8000) with the home page inside my_htdocs. After the core server is initialized it will source all the files in the my_custom_code_directory. This code can add new URL domains, document handlers, etc. etc.