Themelia Pro A powerful new development platform built on ASP.NET.
 
Using Page Aliases
 
 

One of the most popular types of Themelia aliases is the page alias.  This type of alias logically connects an endpoint to a physical page.  From a technical standpoint, page aliasing is actually incredibly similar to URL rewriting, except that 1) Themelia Pro page aliasing is a web domain-aware topic and 2) URL rewriting quite literally rewrites the URL inside the web browser, thus destroys the orignal URL completely and destroys your ability to use query strings.  Page aliasing is a much more mature topic than rewriting.

You can setup a page alias in in two ways: via web components and via configuration.  Web Components will be discussed in a difference place, so here only the configuration method will be discussed.

As with all types of aliases, page aliases are setup in their endpoint.  So, let's start our example with the following endpoint:

<themelia.web>
  <webDomains>
    <add defaultPage="/Page_/Home/Home.aspx">
      <endpoints>
        <add selector="pathStartsWith" text="/contact/" type="PageAlias" />
      </endpoints>
    </add>
  </webDomains>
</themelia.web>

At this point, the configuration is meaningless.  There's an endpoint, but there's nothing there to tell the endpoint how to handle the page alias.  To provide this information, we use the endpoint "parameter" attribute to specify which page we are going to alias:

<themelia.web>
  <webDomains>
    <add defaultPage="/Page_/Home/Home.aspx">
      <endpoints>
        <add matchType="pathStartsWith" type="PageAlias" text="/contact/" parameter="/Sequence_/Contact.aspx" />
      </endpoints>
    </add>
  </webDomains>
</themelia.web>

There's all there is to it.  Other alias types and other endpoint types will use the parameter attribute for other things, but page aliases use "parameter" to represent the target page.