Did you know ... Search Documentation:
Predicate find_handler/3
 find_handler(+Path, -Action, -Options) is det[private]
Find the handler to call from Path. Rules:
  • If there is a matching handler, use this.
  • If there are multiple prefix(Path) handlers, use the longest.

If there is a handler for /dir/ and the requested path is /dir, find_handler/3 throws a http_reply exception, causing the wrapper to generate a 301 (Moved Permanently) reply.

Errors
- existence_error(http_location, Location) @throw http_reply(moved(Dir))
To be done
- Introduce automatic redirection to indexes here?