Routing
The first stage of routing happens in Apache. Elgg uses rewrite rules to map a request to one of the primary handlers. The primary handler dispatches the request to the registered secondary handler.
As an example, the relative URL /action/comments/add/
is routed to the action handler registered for the "comments/add"
action. The relative URL /friends/johndoe/
is routed to the page handler registered for the friends
identifier.
Code location
Apache rewrite rules: /.htaccess
Primary handlers: /engine/handlers/
Library functions: /engine/lib/actions.php
, /engine/lib/pagehandler.php