rewrite.properties
Axiom has the ability to do URL rewrites. This allows the ability to map certain URLs to Axiom URLs, which are strictly object based. For example, you could specify that / should be mapped to /homepage, and this will allow any requests coming to justhttp://domain/to map tohttp://domain/homepage.
The URL rewrites are specified on a per application basis, through a file called rewrite.properties. This file goes in each application's top level folder (in the same location where app.properties exists). The format is simply a bunch of name/value pairs, with the name being the rewritten form of the URL (which the user will typically enter in the browser), and the value being what that URL should actually map to in terms of the Axiom object model. Order DOES matter in the rewrite.properties file, as Axiom will examine each rule in succession until it finds a match, performs the rewrite, and then aborts the rewrite process. Note that if you use rewrite rules to map / to a particular object off of root and if other objects exist off of the root object in your Axiom application, you must include an entry for each of those objects in the rewrite.properties file. Failure to do so will make those objects off of root non-accessible as the rewrite rules would map each of them to children off the homepage instead of children of the root.
The following is a simple yet comprehensive example of how a rewrite.properties file would look:
/formbuilder = /formbuilder
/filefolder = /filefolder
/ = /home
In this application, there a total of 6 objects that are children of the root object. We specify that all of the children of root, except the homepage object, have rewrite rules that leave the URL of those objects and their descendants unchanged. Therefore, the example url "/formbuilder' can still be obtained fromhttp://domain/formbuilder. The homepage, on the other hand, is the only object whose URL structure is rewritten to something different. Here, / is specified to map to /home, so if the browser makes a request forhttp://domain/, it will map tohttp://domain/home(which corresponds to the application's homepage).
