Skip to content
Greg Bowler edited this page May 11, 2026 · 3 revisions

This page documents WebEngine's routing behaviour as a reference rather than a tutorial.

Routing topics

WebEngine routing covers:

  • basic file-based route resolution
  • index file resolution
  • dynamic path matching
  • automatic header and footer inclusion
  • API route handling

For the lower-level routing component, see https://www.php.gt/docs/Routing/Home/.

Edge cases

The main cases to watch for are:

  • clashing file and directory names
  • clashes between dynamic and static routes
  • content negotiation where one URL may need to serve more than one response type

When a route stops feeling obvious, it is usually worth stepping back and simplifying the path structure rather than adding another special case.


Read about page logic conventions next.

Clone this wiki locally