diff options
author | vnugent <public@vaughnnugent.com> | 2023-05-29 17:35:08 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-05-29 17:35:08 -0400 |
commit | 765d3d328af49f92f1d0b296bfba2d7791e0cdf5 (patch) | |
tree | 4cdea3095b53f06508dbf05f4181c53e2844fc48 /plugins/VNLib.Plugins.Essentials.Content.Routing/src/sample.routes.xml | |
parent | 31220eaf6583c28f2df5070c3c8841a02a17cdbe (diff) |
XML file backed content routing, no more db required
Diffstat (limited to 'plugins/VNLib.Plugins.Essentials.Content.Routing/src/sample.routes.xml')
-rw-r--r-- | plugins/VNLib.Plugins.Essentials.Content.Routing/src/sample.routes.xml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/plugins/VNLib.Plugins.Essentials.Content.Routing/src/sample.routes.xml b/plugins/VNLib.Plugins.Essentials.Content.Routing/src/sample.routes.xml new file mode 100644 index 0000000..3c87aa7 --- /dev/null +++ b/plugins/VNLib.Plugins.Essentials.Content.Routing/src/sample.routes.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8" ?> + +<!--Routes container element holds a collection of route elements--> +<routes> + <!-- + Example route configuration for a single page app + where the tree looks like this: + / (index.html) + /assets (assets directory) (css and js files) + + Wildcard hosts match all hosts that do not have rules with more specific hosts + --> + + <!-- + Allow assets directory to pass through for all requests, using the Continue routine (1) + + Because this route has a more specific path than the catch all route + it will be processed first + --> + <route routine="1" privilage="0"> + + <!--Wildcard host--> + <hostname>*</hostname> + + <!--All paths that start with /assets/ will be matched--> + <path>/assets/*</path> + </route> + + <!--Overwrite all other requests to the index file (catch all) using the ServeOther routine (4)--> + <route routine="4" privilage="0"> + + <!--Wildcard hostname--> + <hostname>*</hostname> + + <!--Declares that all files after / will be matched by this rule--> + <path>/*</path> + + <!--Return to the root path, lets the file processor handle extension searching--> + <alternate>/</alternate> + </route> + + <!--All routes that do not match will be allowed, this is only / since it does not have a matching rule--> + +</routes>
\ No newline at end of file |