I'd like to pass all requests for a given directory using a plugin or template file.
For instance, all of the following requests would be sent to the plugin:
mysite.com/directory/blah mysite.com/directory/foo/bar mysite.com/directory/another/one/here
I would then like to do some custom processing on the "blah", "foo bar", and "another one here" data, outputting resulting content.
I've looked into rewrite rules, but I can't figure out if this is just used for "prettifying" URLs or if it can be used for more complex processing.
Edit: I do not believe I need an endpoint. I don't want to add an action to some other post types. For instance, let's say /directory/ is retrieving content from another server.