Monday, December 18, 2006

A light-hearted usability article:

http://www.useit.com/alertbox/film-ui-bloopers.html

 

12/18/2006 3:26:44 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, December 06, 2006
When an existing site made up of .html pages needs functionality added (such as the newslister control) then the pages may need changed to .aspx.  This is not a problem unless the site has good page ranking, is heavily SEO optimised or there is some other reason that changing the URl is a problem.  There are a number of solutions to this:

1. Do nothing and live with the broken links.

2. Set up a 301 redirect (permanently moved) either in IIS or using IIS to point 404s to an aspx page that does the work.  (Can obviously be done in asp or php or whatever as well).  This is probably the best solution in most cases, as it avoids any future problems/complications.

3. Map .html to ASP.Net in IIS and use URL rewriting to an aspx page.  this is probably too much of a faff in most situations.

4. Tell ASP.Net to treat .html files as .aspx.  This is actually pretty straight forward to do and may be a good solution in a lot of cases.  As far as I can see the performance not on .html pages without any server side code is minor; so the major downside is that it adds an extra layer of complication for the future.

Here is how to do option 4:
 - Get the hosting company to map the .html extension to the ASP.Net isapi DLL.  (NB: Titan will do this without any quibbles, but other hosts may not.)
 - Add the following to the web.config:

        <compilation>
            <buildProviders>
                <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
            </buildProviders>
        </compilation>
        <httpHandlers>
            <add verb="GET, HEAD, POST, DEBUG" path="*.html" type="System.Web.UI.PageHandlerFactory"/>
        </httpHandlers>


Barry

12/6/2006 3:12:22 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback