![]() | ||
![]() | Building & Styling Applications | ![]() |
DirectURLs |
![]() | ![]() |
The system uses an automatically generated numerical addressing schema to assign page URLs. The reasons and benefits of this are described in 'The numerical addressing schema', however there is also a need to be able to assign specific 'user-defined' URLs to pages. DirectURLs give you this ability.
Why use DirectURLs?
How DirectURLs work
When a user attempts to browse to a DirectURL, there is no matching page to handle the request, so the request falls through to the web server's '404' handler. Normally this would simply respond with the standard '404 page not found' screen, however before resorting to that it first checks to see if there is a matching DirectURL. If there is, it redirects to the relevant page.
Types of DirectURL
There are two types of DirectURL, distinguished by where the DirectURL is entered:
Page-based DirectURLs alow you to assign one or more DirectURLs to a page. Read how.
Form-based DirectURLs allow a text field in a Form to be used to define the DirectURL. Rather than just displaying a page, this will tell the system to display a given page with the matching Form record displayed on it (formatted according to the Queries embedded on the page). This is useful, for example, if you want to provide DirectURLs based on dynamic structured information like a product catalog.
- The destination page for a form-based DirectURL is specified in the Form component's field editor.
- The DirectURLs are specified by entering values in the text field of the Form record.
Overriding the standard '404' page
You can create your own page to be displayed when there is no matching page to show, by adding a Page-based DirectURL of * (ie a single asterisk) to the page you want to appear. This could typically be a 'prettier' page-not-found page, or take the user to a search page, or perhaps to the home page of the site. For an example - click here