Quick links: Content - sections - sub sections
EN FR
Table of content

Warning: this URL engine will be removed in futur version of Jelix.

All the urls generated by the "simple" URL engine will be like entrypoint.php?module=...&action=...&.... This is a very simple engine and it is very fast.

Configuration

If you use the standard featured entry points, you have nothing to configure. On the other hand, if you add some, you have to indicate them in the simple_url_engine_entrypoints section to declare them, and precise what are the concerned modules and types of requests. Here is the form of the parameters of this section:


   name_of_script_without_suffix = "list of selectors separated by a space"

Selectors can have one of these forms :

  • mod~act@req: the entry point concerns the act action and the mod module for the req type of request
  • mod~*@req: the entry point concerns all the actions of the mod module for the req type of request
  • mod~ctrl:*@req: the entry point concerns all the actions of the controller ctrl, of the mod module for the req type of request
  • @req: the entry point concerns all the actions of all the modules for the req type of request

You thus indicate what actions pass through what entry point.

Example:


   [simple_urlengine_entrypoints]
   index = "@classic"
   xmlrpc = "@xmlrpc"
   jsonrpc = "@jsonrpc"
   testnews = "unittest~url2@classic unittest~url3@classic"
   foo__bar = "unittest~url4@classic"
   news = "news~*@classic"
  • the index.php entry point concerns all the actions of the classic type of request (except those specified in other entry points). It is thus the default entry point for the classic type of request.
  • idem for the xmlrpc.php, and jsonrpc entry points concerning repectively all the actions of the xmlrpc and jsonrpc types of requests.
  • the testnew.php entry point concerns the url2 and url3 actions of the unittest module for the classic type of request
  • the foo__bar concerns the foo/bar.php entry point and the url4 entry point of the unittest module module for the classic type of request
  • the news.php entry point concerns all the news module

For the url2 action, jUrl will then generate the testnews.php?module=unittest&action=url2&other-parameters url.

url with https

To indicate, with the simple url engine, the actions that will have to be in https, you indicate the list of actions in the simple_urlengine_https option in the urlengine section. The syntax is the same as in the simple_urlengine_entrypoints section.


 [urlengine]
  ...
  simple_urlengine_https = "unittest~url6@classic @xmlrpc"

 [simple_urlengine_entrypoints]
  ...