By default (ie, without any addons or third-party code running to change the routing, and without the native Pages module or the third-party Structure module installed), the first segment of a URI will always call a template group and the second segment will call a template within that group. So if I have, say:
http://www.example.com/group1/my-awesome-thing
ExpressionEngine will look inside group1
for a template called my-awesome-thing
, and render whatever is in that template.
If that template contains an {exp:channel:entries}
loop that does not have dynamic="no"
specified, EE does some further magic and checks the URI -- is the third segment a slug or the reserved category word? are there pagination or archive segments? -- and displays content accordingly. There's more things that the builtin route parser does, as well: James Smith created a great schematic, which can be found here: http://www.jamessmith.co.uk/articles/expressionengine_url_schematic