In Themelia, everything is essentially locked down. You need to control how your web site is accessed. You can't just let people use your web site any which they they want. To maximize your web site performance and to make search-engines happy, you need to control the roads to your world. Themelia Endpoints provide this, but don't think that these are simply rigid one-to-one mappings from the logical to the physical world.
Actually, endpoints are incredibly flexible. This flexibility comes from the fact that you declare endpoints with a specific match type. You can declare an endpoint that matches specific text at the beginning of a URL, at the end of a URL, at the beginning of a web domain path, at the end, or even declare that match on text anywhere in a URL. You can even combine these as you will see in future documentation.
For an example of the different match types, see the following:
<themelia.web>
<webDomains>
<add defaultPage="/Page_/Home/Home.aspx">
<endpoints>
<add selector="pathStartsWith" text="/help/" type="PageAlias" parameter="/Sequence_/RootContact.aspx" />
<add selector="contains" text="/help/" type="PageAlias" parameter="/Sequence_/Contact.aspx" />
</endpoints>
</add>
</webDomains>
</themelia.web>
Here you can see two endpoints matching on the same text, but with two different match types. The first states that the text must be at the beginning of a path, where as the second allows the text to be anywhere in the URL. As you can see even in this extremely simple example, there's a logical order of specificity of match types. If an endpoints requires text to be at the beginning of a URL, that's more specific than an endpoint allowing the text to be anywhere. Here's a list of all the available match types with their order of specificity:
- pathEquals
- endsWith
- webDomainPathStartsWith
- webDomainPathEquals
- pathStartsWith
- startsWith
- pathContains
- contains
There's actually a shorthand of these, though, that can be placed directly with the endpoint text.
- Beginning with "wdp^" and ending with "$" means "webDomainPathEquals"
- Beginning with "p^" and ending with "$" means "pathEquals"
- Beginning with "^" and ending with "$" means "equals"
- Beginning with "wdp^" by itself means "webDomainPathStartsWith"
- Beginning with "p^" by itself means "pathStartsWith"
- Beginning with "^" by itself means means "startsWith"
- Ending with "$" by itself means means "endsWith"
Many people will prefer the long form, but there also be those that will prefer the following shorthand. If you're into the shorthand, just put anything in the matchType attribute, and decorate your text with the apprproate attributes:
<themelia.web>
<webDomains>
<add defaultPage="/Page_/Home/Home.aspx">
<endpoints>
<add selector="-" text="p^/help/" type="PageAlias" parameter="/Sequence_/RootContact.aspx" />
<add selector="contains" text="/help/" type="PageAlias" parameter="/Sequence_/Contact.aspx" />
</endpoints>
</add>
</webDomains>
</themelia.web>
Again, the shorthand is optional, but it's there just in case you want to keep your matchType and text together.