Section: Simple url engine
^ jUrl: automatic urls | basic significant url engine » |
− Table of content
This engine is the one activated by default. All the urls 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 theact
action and themod
module for thereq
type of requestmod~*@req
: the entry point concerns all the actions of themod
module for thereq
type of request@req
: the entry point concerns all the actions of all the modules for thereq
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 thos 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.php entry point concerns 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]
...