Forum OpenACS Q&A: Re: How to use ns_register_filter to establish a route to be served by NaviServer

Hi Tony

I can't believe I'm linking to a Philip Greenspun article from the 1990s, but I always recall this article when I work with registered filters/procs as he explained it very clearly https://philip.greenspun.com/wtr/aolserver/introduction-1.html

This is his explanation:
ns_register_proc GET /foo -- instead of looking in the file system for a file to serve, run a specified procedure whenever a user requests a URL starting with "/foo"
ns_register_filter GET /foo* -- in addition to what else the server might do in serving a request starting with "/foo", also run a specified procedure at a specified time (before or after the page is served)

I think in your case, ns_register_proc might be what you need.

Hope this helps
Brian