Themelia Pro A powerful new development platform built on ASP.NET.
 
Enabling Missing Slash Access
 
 

Themelia Pro provides you with complete control over how you want your web site to be accessed.  For example, you might declare that /login/, /contact/ and /suggestion/ be access points into your web site.  However, you might, instead, declare /login, /contact/ and /suggestion.  But what about both?  With Themelia Pro you have the option to allow access without the trailing slash through its acceptMissingTrailingSlash option.  Here's an example:

<themelia.web>
  <webDomains>
    <add enableMissingSlash="true">
      <endpoints>
        <add selector="startsWith" text="/authenticate/" type="Authentication" />
        <add selector="startsWith" text="/callback/facebook/" type="Facebook" />
      </endpoints>
    </add>
  </webDomains>
</themelia.web>

Here we are allowing access to the Authentication handler via /authenticate/ or /authenticate and to the Facebook handler via /callback/facebook/ or /callback/facebook.

It's important to remember that this optional is on a per web domain level.  This will allow you to require the trailing slashes for your "service' web domain and declare them as optional for the rest of your web site.  Here's another example:

<themelia.web>
  <webDomains>
    <add enableMissingSlash="true">
      <endpoints>
        <add selctor="endsWith" text="/vendor/xyzcorp/" type="Redirect" parameter="http://www.xyzcorp.tempuri.org/referral/abccorp/" />
      </endpoints>
      <processor>
        <add type="ABCCorp.Web.Routing.ProductParsingFallThroughProcessor" />
      </processor>
    </add>
    <add name="service" path="service">
      <endpoints>
        <add selctor="webDomainPathEquals" text="/authenticate/" type="Authentication" />
        <add selctor="webDomainPathEquals" text="/registration/" type="XYZCorp.ThirdParty.RegistrationHttpHandler, XYZCorp.ThirdParty" />
      </endpoints>
    </add>
  </webDomains>
</themelia.web>

Here we have two web domains: the default ("root") and "service".  The first will accept a request to /vendor/xyzcorp/ and /vendor/xyzcorp for a Themelia Pro redirect, but /service/authenticate/ and /service/registration/ must be accessed directly (...you really don't want more than one endpoint to your service floating around!)

Remember, this is per web domain and, therefore, applies to that which is inside of the web domain.  This means that it doesn't apply to things outside of a web domain, like the web domain itself.  So, if you would like to allow access to the root of your web domains without the slash, set enableWebDomainMissingSlash to true on the <webDomains> configuration collection.

Here's an example:

<themelia.web>
  <webDomains enableWebDomainMissingSlash="true">
    <add>
      <!--configuration omitted-->
    </add>
    <add name="service" path="service" defaultPage="/Page_/Service/Home.aspx">
      <endpoints>
        <add selector="webDomainPathEquals" text="/authenticate/" type="Authentication" />
        <add selector="webDomainPathEquals" text="/registration/" type="XYZCorp.ThirdParty.RegistrationHttpHandler, XYZCorp.ThirdParty" />
      </endpoints>
    </add>
  </webDomains>
</themelia.web>

Here the service web domain root is accessible by either /service/ or /service.