Web application routing
Overview
Routing for HTTP requests to the web server.
Applies in addition to the system’s web server descriptor, organizing automatic redirects and substitutions when specific pages are accessed.
For example, a reference to /scripteditor
is redirected to /scripteditor/
. And that in turn substitutes the contents of /scripteditor/index.html
without redirection.
redirection.
The url_routes.json
is expected to contain the redirect and substitution pages of all system web applications included in the distribution.
[ { "url": str, "type": "redirect" | "static" | "static_dir_with_404", "to": str, "code": int, "dir": str }, ... ]
Field | Description |
---|---|
|
The relative-root URL to be routed. Supports wildcard ( |
|
routing mode:
|
|
the new URL at which the resource is accessible. |
|
(for |
|
(for |
Example
[ { "url": "/", "type": "static", "to": "/index.html" }, { "url": "/login", "type": "static", "to": "/index.html" }, { "url": "/doc", "type": "redirect", "to": "/doc/", "code": 301 }, { "url": "/doc/", "type": "static", "to": "/doc/index.html" }, { "url": "/selector", "type": "redirect", "to": "/selector/", "code": 301 }, { "url": "/selector/", "type": "static", "to": "/selector_dist/index.html" }, { "url": "/selector/*", "type": "static_dir_with_404", "to": "/selector_dist/index.html", "dir": "/selector_dist/" }, { "url": "/scripteditor", "type": "redirect", "to": "/scripteditor/", "code": 301 }, { "url": "/scripteditor/", "type": "static", "to": "/scripteditor/index.html" }, { "url": "/webphone", "type": "redirect", "to": "/webphone/", "code": 301 }, { "url": "/webphone/", "type": "static", "to": "/webphone/index.html" } ]