Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Pretty URLs: URL aliases and URL wildcards

How Exponential turns readable addresses into module addresses - automatic URL aliases for content nodes, global aliases for module views, wildcard patterns for redirects and rewrites, history redirects when content…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/web-framework-developers/url-aliases-and-wildcards.md

On this page

Pretty URLs: URL aliases and URL wildcards

This page is for developers who would add a slug column and a route with a {slug} parameter. In Exponential you do not: every content node has a URL alias built from the names of its path, and the kernel translates the alias to content/view/full/<node> before routing (The request lifecycle). Two more mechanisms cover what route tables usually do for redirects: global aliases and URL wildcards.

Contents

  1. Three kinds of addresses
  2. Node aliases: slugs you never write
  3. Global aliases for module views
  4. URL wildcards
  5. Using them in code
  6. Compared with other frameworks

Three kinds of addresses

From URL wildcards and custom aliases:

KindMade whereExample
Node aliasautomatically, and on the node's URL aliases tab/About-us
Global aliasSetup > URL translator (/content/urltranslator)login for user/login
WildcardSetup > URL wildcards (/content/urlwildcards)news/* to articles/{1}

Node aliases: slugs you never write

  • An alias is made from the object's name, or from the class's URL alias name pattern, transformed by site.ini [URLTranslator] TransformationGroup (urlalias shipped; urlalias_iri keeps letters such as accents).
  • Each translation has its own alias in its language.
  • When a node is renamed or moved, the new alias is created and the old one stays as a redirect: no redirect table to maintain.
  • A node can have extra aliases (campaign addresses, an old site's address) on its URL aliases tab.
  • After an import or a change of the transformation group, rebuild with php bin/php/updateniceurls.php.

Details: URL aliases and nice URLs. The table behind it is handled by eZURLAliasML (kernel/classes/ezurlaliasml.php).

Global aliases for module views

Your module views live at /<module>/<view>. A global alias gives one a friendlier address (login for user/login), either as a redirect (301 to the destination) or direct (the visitor keeps the typed address). Create them in the administration or ship them as part of your installation steps.

URL wildcards

A wildcard is a pattern with * and a destination with {1}, {2} placeholders, again redirecting or direct:

PatternDestinationnews/2026/october becomes
news/*articles/{1}articles/2026/october
old-blog/*https://blog.example.org/{1}a redirect to the other site

Wildcards are translated by eZURLWildcard::translate() (kernel/classes/ezurlwildcard.php), switched by site.ini [URLTranslator] WildcardTranslation (enabled shipped), with MaximumWildcardIterations (20) to stop loops. A URL alias that matches an address wins over a wildcard. Try an address on the wildcards page shows what an address becomes without changing anything (Links, URL aliases, wildcards).

Using them in code

NeedUse
Link to a node{$node.url_alias|ezurl} in templates, eZURI::build( $node->attribute( 'url_alias' ) ) in PHP
Find a node by its aliaseZContentObjectTreeNode::fetchByURLPath( 'about_us' ) (The content API)
Never print a system addressrules can redirect or refuse /content/view/full/<id> typed by users (Request rules)

Compared with other frameworks

Framework habitIn Exponential
A slug field and a unique indexthe URL alias, generated and kept per translation
A redirects table or package for moved pagesthe history alias, made automatically
Route::redirect(), RedirectView, redirect() in routesglobal alias (redirect) or wildcard
Catch-all route that looks up a paththe alias translation already does it, for content
Localized routesone alias per translation; siteaccesses per language (Siteaccesses)

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x