Wednesday, 10 October 2007

EPiServer Friendly URLS

When integrating our existing Esendex site with EPiServer and deploying onto different web servers we had some issues with friendly URLs. For friendly URLs to work when putting the web site on your different servers you need to ensure the following:
  • Friendly URL option is enabled in your site config
    <add key="EPfEnableFriendlyUrl" value="true"/>
  • The IIS custom 404 error page needs to point to the site URL /Util/Notfound.aspx. EPiServer then checks if the URL requested exists as a friendly URL, and displays the page if it does.
  • The friendly URL httpmodule in the web.config file also needs to be declared.
    <add name="FriendlyUrl" type="EPiServer.Util.FriendlyUrlModule, EPiServer"/>
One problem with this is that if the page is not found, the built-in error page is shown. EPiCode, a EPiServer research project has a module BVNetwork.404Handler that can help with this and also provide redirection functionality too - something we found very useful. Features at a glance:
  • Custom FileNotFound page to replace the built-in error page
  • A powerful CustomRedirects module thats extends the built-in ShortCurUrl function
  • An admin plugin that shows all the CustomRedirects defined
  • FallBack url handling that allows all 404 requests to be redirected to a back-end server only if the url exists on that server

No comments: